| I am seeing the same general behavior as Tony's first run...for every run. Tested on:
- Jenkins: 2.19.1
- – github-plugin: 1.26.0
- Jenkins: 2.32.2
- – github-plugin: 1.26.0
Using:
- Public & Enterprise GitHub
- Webhooks, pull requests, manual builds
Since the default activity is to resolve any repos, I checked to see if it was picking up on any repos, which it was: Picks up on multiple repos because of Global Shared Pipeline Library getting pulled from GitHub Jenkins Log
Feb 15, 2017 10:51:18 PM FINEST org.jenkinsci.plugins.github.status.sources.AnyDefinedRepositorySource repos
repositories source=repo-name-contributor value=[GitHubRepositoryName[host=github.com,username=psprings,repository=jenkins-pipeline-helpers-lib], GitHubRepositoryName[host={{ENTERPRISEGITURL}},username={{ENTERPRISEGITORG}},repository={{ENTERPRISEGITREPO}}]]
But the output did not reflect any repos: Pipeline Console Text
Unable to find source-code formatter for language: bash. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
[Pipeline] step
[Set GitHub commit status (universal)] PENDING on repos [] (sha:6f85cd0) with context:ci/jenkins/foo
So I tried manually setting the repo url as per xianju's suggestion, and got the same result (although overriding the sha worked just fine). Jenkinsfile snippet
step([
$class: "GitHubCommitStatusSetter",
commitShaSource: [$class: "ManuallyEnteredShaSource", sha: gitCommit],
//reposSource: [$class: "AnyDefinedRepositorySource"],
reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://enterprisegithuburl.com/Org/Repo" ],
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/foo" ],
errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]],
statusResultSource: [ $class: "ConditionalStatusResultSource", results: [
[$class: "AnyBuildResult", message: message, state: state]] ]
]);
A status message is set by the GitHub Branch Source plugin if the build passes/fails, but would like more granular commit statuses. Any thoughts/suggestions? |