sha1 parameter not present in LTS jenkins 1.651.2 + ghprb 1.32.2, parametrized jobs
See original GitHub issueAfter upgrading to LTS 1.651.2 and latest stable version of ghprb plugin 1.32.2, I observe builds that have sha1 parameter undefined. Jobs were configured with DSL:
freeStyleJob('xxxx_pull-requests') {
parameters {
stringParam('sha1', null, null)
}
githubPullRequest {
cron("${scm_poll_short}")
useGitHubHooks()
}
}
...
}
Build was triggered, ghprb* variables were populated to environment, however, sha1 was not present. it can be seen here: https://ostroproject.org/jenkins/job/dsl-meta-ostro_pull-requests/1514/
After I removed stringParameter() from DSL, jobs started to be populating sha1 variable properly: https://ostroproject.org/jenkins/job/dsl-meta-ostro_pull-requests/1515/ , but that means it’s impossible to start those jobs manually anymore.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:20 (1 by maintainers)
Top Results From Across the Web
GitHub Pull Request Builder - Jenkins Plugins
If you want to manually build the job, in the job setting check "This build is parameterized" and add string parameter named "sha1"....
Read more >Plugins affected by fix for SECURITY-170 - Jenkins
The fix for this issue — which was first included in Jenkins versions 1.651.2 and Jenkins 2.3 — means that only build parameters...
Read more >Jenkins Job Builder Documentation - Read the Docs
Jenkins Job Builder takes simple descriptions of Jenkins jobs in YAML or JSON format and uses them to configure. Jenkins.
Read more >Jenkins Job Builder Documentation - manpages.ubuntu!
If no configuration files are found (either in the default paths or given through the command-line), jenkins-jobs will skip querying for plugin information....
Read more >Jenkins Pull Request builder ignoring branches with ${sha1}
So step one is to make sure that the only trigger enabled is the GHPRB plugin. The next step is to recognize that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I might have the same issue today after upgrading to Jenkins 2.7 and plugin version 1.32.2. The environment variable
${ghprbSourceBranch}
is suddenly empty… 😦Could be connected?
This is happening to us as well. We got it to run the correct PR by removing the sha1 parameter from our Jenkins job, but now all pending builds are combined into a single build and only the first one is run, so we get a job that looks like this (which will only run and comment on 2176):