-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Jenkins and plugins versions report
Environment
Jenkins: 2.401.3
OS: Linux - 5.4.0-1093-aws
Java: 11.0.19 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
github-checks:545.v79a_a_68b_ca_682
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 18 for the agents and the controller
Reproduction steps
- Set up a job to use SSH credentials to pull from GitHub
- In the GitHub checks configuration, override the credentials to point to app credentials
- Stop a job while it's building
- After the first job failure all subsequent jobs fail to report the build result to GitHub with the error:
[GitHub Checks] Failed Publishing GitHub checks: java.io.IOException: Unsupported credential type: com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey
Which means it is ignoring the credential override after the first failure.
Expected Results
All jobs should be using the override for the credential id, instead of the credentials used to pull the code.
Actual Results
[GitHub Checks] Failed Publishing GitHub checks: java.io.IOException: Unsupported credential type: com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey
Presumably using the wrong credentials.
Anything else?
I suspect the problem started with https://github.com/jenkinsci/github-checks-plugin/pull/341/files
Specifically, I think findGitHubAppCredentials is returning the first credentials (SSH Key type) instead of the app credentials configured:
github-checks-plugin/src/main/java/io/jenkins/plugins/checks/github/SCMFacade.java
Line 126 in 8d17133
| public Optional<StandardUsernameCredentials> findGitHubAppCredentials(final Job<?, ?> job, final String credentialsId) { |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working