Skip to content

Commit 466dd4e

Browse files
mmusenbrCopilot
andauthored
Fix Connection Test in Job config when job credential is used from folder (#1865)
* Fix Test Connection in Job when job credential is used from folder On the connection test from the folder, the GitLabConnection was initialized with the jobCredentialId, therefore the getClient assumes the system configured credential is the same as the job config credential and only looks in the syste creds store. Fix #1864 Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com> * Use ignore certificate errors from configured connection to test connection Previously on test connection certificate errors were always ignored. Pass in the settings from the used connection to test. Applied suggestion from @Copilot. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6d874af commit 466dd4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/dabsquared/gitlabjenkins/connection/GitLabConnectionProperty.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ public FormValidation doTestConnection(
183183
new GitLabConnection(
184184
"",
185185
gitLabConnectionTested.getUrl(),
186-
jobCredentialId,
186+
gitLabConnectionTested.getApiTokenId(),
187187
gitLabConnectionTested.getClientBuilderId(),
188-
true,
188+
gitLabConnectionTested.isIgnoreCertificateErrors(),
189189
gitLabConnectionTested.getConnectionTimeout(),
190190
gitLabConnectionTested.getReadTimeout())
191191
.getClient(item, jobCredentialId)

0 commit comments

Comments
 (0)