-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins version: 2.222.4
Java version:
java.runtime.name OpenJDK Runtime Environment
java.runtime.version 1.8.0_212-b04
java.specification.name Java Platform API Specification
java.specification.vendor Oracle Corporation
java.specification.version 1.8
java.vendor IcedTea
java.vendor.url https://icedtea.classpath.org
java.vendor.url.bug https://icedtea.classpath.org/bugzilla
java.version 1.8.0_212
java.vm.info mixed mode
java.vm.name OpenJDK 64-Bit Server VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Oracle Corporation
java.vm.specification.version 1.8
java.vm.vendor IcedTea
java.vm.version 25.212-b04
Plugins:
Name-Version-Enabled
ace-editor 1.1 true
active-directory 2.16.1 true
analysis-model-api 9.8.0 true
ansicolor 0.7.5 true
ant 1.11 true
antisamy-markup-formatter 2.1 true
apache-httpcomponents-client-4-api 4.5.13-1.0 true
authentication-tokens 1.4 true
badge 1.8 true
blueocean 1.24.4 true
blueocean-autofavorite 1.2.4 true
blueocean-bitbucket-pipeline 1.24.4 true
blueocean-commons 1.24.4 true
blueocean-config 1.24.4 true
blueocean-core-js 1.24.4 true
blueocean-dashboard 1.24.4 true
blueocean-display-url 2.4.0 true
blueocean-events 1.24.4 true
blueocean-git-pipeline 1.24.4 true
blueocean-github-pipeline 1.24.4 true
blueocean-i18n 1.24.4 true
blueocean-jira 1.24.4 true
blueocean-jwt 1.24.4 true
blueocean-personalization 1.24.4 true
blueocean-pipeline-api-impl 1.24.4 true
blueocean-pipeline-editor 1.24.4 true
blueocean-pipeline-scm-api 1.24.4 true
blueocean-rest 1.24.4 true
blueocean-rest-impl 1.24.4 true
blueocean-web 1.24.4 true
bootstrap4-api 4.6.0-1 true
bouncycastle-api 2.18 true
branch-api 2.6.2 true
build-monitor-plugin 1.12+build.201809061734 true
built-on-column 1.1 true
checks-api 1.5.0 true
cloudbees-bitbucket-branch-source 2.9.7 true
cloudbees-disk-usage-simple 0.10 true
cloudbees-folder 6.15 true
command-launcher 1.5 true
conditional-buildstep 1.4.1 true
configuration-as-code 1.36.2 true
configuration-as-code-groovy 1.1 true
credentials 2.3.11 true
credentials-binding 1.24 true
cucumber-reports 5.5.0 true
data-tables-api 1.10.23-2 true
disk-usage 0.28 true
display-url-api 2.3.4 true
docker-commons 1.16 true
docker-workflow 1.26 true
durable-task 1.35 true
echarts-api 4.9.0-3 true
envinject 2.3.0 true
envinject-api 1.7 true
extended-read-permission 3.2 true
external-monitor-job 1.7 true
favorite 2.3.2 true
font-awesome-api 5.15.2-1 true
forensics-api 0.10.1 true
gatling 1.3.0 true
ghprb 1.42.2 true
git 4.4.5 true
git-client 3.5.1 true
git-server 1.9 true
github 1.32.0 true
github-api 1.117 true
github-branch-source 2.9.3 true
gitlab-hook 1.4.2 true
gitlab-plugin 1.5.13 true
gradle 1.36 true
groovy-postbuild 2.5 true
handlebars 1.1.1 true
handy-uri-templates-2-api 2.1.8-1.0 true
hsts-filter-plugin 1.0 true
htmlpublisher 1.25 true
icon-shim 2.0.3 true
jackson2-api 2.11.1 true
javadoc 1.6 true
jdk-tool 1.5 true
jenkins-design-language 1.24.4 true
jenkins-multijob-plugin 1.36 true
jira 3.1.1 true
job-dsl 1.77 true
jobConfigHistory 2.26 true
jquery 1.12.4-1 true
jquery3-api 3.5.1-2 true
jsch 0.1.55.2 true
junit 1.37 true
kubernetes 1.24.1 true
kubernetes-client-api 4.9.2-2 true
kubernetes-credentials 0.8.0 true
ldap 1.25 true
lockable-resources 2.10 true
m2release 0.16.2 true
mailer 1.32.1 true
matrix-auth 2.5.1 true
matrix-project 1.18 true
maven-plugin 3.8 true
metrics 4.0.2.6 true
momentjs 1.1.1 true
multiple-scms 0.6 true
nodelabelparameter 1.7.2 true
oic-auth 1.8 true
okhttp-api 3.14.9 true
pam-auth 1.6 true
parameterized-trigger 2.39 true
performance 3.19 true
pipeline-build-step 2.13 true
pipeline-graph-analysis 1.10 true
pipeline-input-step 2.12 true
pipeline-milestone-step 1.3.2 true
pipeline-model-api 1.8.4 true
pipeline-model-declarative-agent 1.1.1 true
pipeline-model-definition 1.8.4 true
pipeline-model-extensions 1.8.4 true
pipeline-rest-api 2.19 true
pipeline-stage-step 2.5 true
pipeline-stage-tags-metadata 1.8.4 true
pipeline-stage-view 2.19 true
pipeline-utility-steps 2.6.1 true
plain-credentials 1.7 true
plugin-usage-plugin 1.2 true
plugin-util-api 1.7.1 true
popper-api 1.16.1-1 true
postbuild-task 1.9 true
prometheus 2.0.8 true
pubsub-light 1.13 true
purge-build-queue-plugin 1.0 true
rebuild 1.32 true
repository-connector 1.2.6 true
resource-disposer 0.15 true
role-strategy 2.16 true
ruby-runtime 0.12 true
run-condition 1.3 true
scm-api 2.6.4 true
script-security 1.76 true
slack 2.41 true
snakeyaml-api 1.27.0 true
sse-gateway 1.24 true
ssh-agent 1.20 true
ssh-credentials 1.18.1 true
ssh-slaves 1.31.3 true
structs 1.21 true
text-finder 1.15 true
timestamper 1.11.8 true
token-macro 2.12 true
trilead-api 1.0.13 true
variant 1.3 true
view-job-filters 2.2 true
warnings-ng 8.9.2 true
windows-slaves 1.6 true
workflow-aggregator 2.6 true
workflow-api 2.41 true
workflow-basic-steps 2.21 true
workflow-cps 2.88 true
workflow-cps-global-lib 2.17 true
workflow-durable-task-step 2.35 true
workflow-job 2.40 true
workflow-multibranch 2.22 true
workflow-scm-step 2.11 true
workflow-step-api 2.23 true
workflow-support 3.7 true
ws-cleanup 0.39 trueJenkins version: 2.222.4 Java version: java.runtime.name OpenJDK Runtime Environment java.runtime.version 1.8.0_212-b04 java.specification.name Java Platform API Specification java.specification.vendor Oracle Corporation java.specification.version 1.8 java.vendor IcedTea java.vendor.url https://icedtea.classpath.org java.vendor.url.bug https://icedtea.classpath.org/bugzilla java.version 1.8.0_212 java.vm.info mixed mode java.vm.name OpenJDK 64-Bit Server VM java.vm.specification.name Java Virtual Machine Specification java.vm.specification.vendor Oracle Corporation java.vm.specification.version 1.8 java.vm.vendor IcedTea java.vm.version 25.212-b04 Plugins: Name-Version-Enabled ace-editor 1.1 true active-directory 2.16.1 true analysis-model-api 9.8.0 true ansicolor 0.7.5 true ant 1.11 true antisamy-markup-formatter 2.1 true apache-httpcomponents-client-4-api 4.5.13-1.0 true authentication-tokens 1.4 true badge 1.8 true blueocean 1.24.4 true blueocean-autofavorite 1.2.4 true blueocean-bitbucket-pipeline 1.24.4 true blueocean-commons 1.24.4 true blueocean-config 1.24.4 true blueocean-core-js 1.24.4 true blueocean-dashboard 1.24.4 true blueocean-display-url 2.4.0 true blueocean-events 1.24.4 true blueocean-git-pipeline 1.24.4 true blueocean-github-pipeline 1.24.4 true blueocean-i18n 1.24.4 true blueocean-jira 1.24.4 true blueocean-jwt 1.24.4 true blueocean-personalization 1.24.4 true blueocean-pipeline-api-impl 1.24.4 true blueocean-pipeline-editor 1.24.4 true blueocean-pipeline-scm-api 1.24.4 true blueocean-rest 1.24.4 true blueocean-rest-impl 1.24.4 true blueocean-web 1.24.4 true bootstrap4-api 4.6.0-1 true bouncycastle-api 2.18 true branch-api 2.6.2 true build-monitor-plugin 1.12+build.201809061734 true built-on-column 1.1 true checks-api 1.5.0 true cloudbees-bitbucket-branch-source 2.9.7 true cloudbees-disk-usage-simple 0.10 true cloudbees-folder 6.15 true command-launcher 1.5 true conditional-buildstep 1.4.1 true configuration-as-code 1.36.2 true configuration-as-code-groovy 1.1 true credentials 2.3.11 true credentials-binding 1.24 true cucumber-reports 5.5.0 true data-tables-api 1.10.23-2 true disk-usage 0.28 true display-url-api 2.3.4 true docker-commons 1.16 true docker-workflow 1.26 true durable-task 1.35 true echarts-api 4.9.0-3 true envinject 2.3.0 true envinject-api 1.7 true extended-read-permission 3.2 true external-monitor-job 1.7 true favorite 2.3.2 true font-awesome-api 5.15.2-1 true forensics-api 0.10.1 true gatling 1.3.0 true ghprb 1.42.2 true git 4.4.5 true git-client 3.5.1 true git-server 1.9 true github 1.32.0 true github-api 1.117 true github-branch-source 2.9.3 true gitlab-hook 1.4.2 true gitlab-plugin 1.5.13 true gradle 1.36 true groovy-postbuild 2.5 true handlebars 1.1.1 true handy-uri-templates-2-api 2.1.8-1.0 true hsts-filter-plugin 1.0 true htmlpublisher 1.25 true icon-shim 2.0.3 true jackson2-api 2.11.1 true javadoc 1.6 true jdk-tool 1.5 true jenkins-design-language 1.24.4 true jenkins-multijob-plugin 1.36 true jira 3.1.1 true job-dsl 1.77 true jobConfigHistory 2.26 true jquery 1.12.4-1 true jquery3-api 3.5.1-2 true jsch 0.1.55.2 true junit 1.37 true kubernetes 1.24.1 true kubernetes-client-api 4.9.2-2 true kubernetes-credentials 0.8.0 true ldap 1.25 true lockable-resources 2.10 true m2release 0.16.2 true mailer 1.32.1 true matrix-auth 2.5.1 true matrix-project 1.18 true maven-plugin 3.8 true metrics 4.0.2.6 true momentjs 1.1.1 true multiple-scms 0.6 true nodelabelparameter 1.7.2 true oic-auth 1.8 true okhttp-api 3.14.9 true pam-auth 1.6 true parameterized-trigger 2.39 true performance 3.19 true pipeline-build-step 2.13 true pipeline-graph-analysis 1.10 true pipeline-input-step 2.12 true pipeline-milestone-step 1.3.2 true pipeline-model-api 1.8.4 true pipeline-model-declarative-agent 1.1.1 true pipeline-model-definition 1.8.4 true pipeline-model-extensions 1.8.4 true pipeline-rest-api 2.19 true pipeline-stage-step 2.5 true pipeline-stage-tags-metadata 1.8.4 true pipeline-stage-view 2.19 true pipeline-utility-steps 2.6.1 true plain-credentials 1.7 true plugin-usage-plugin 1.2 true plugin-util-api 1.7.1 true popper-api 1.16.1-1 true postbuild-task 1.9 true prometheus 2.0.8 true pubsub-light 1.13 true purge-build-queue-plugin 1.0 true rebuild 1.32 true repository-connector 1.2.6 true resource-disposer 0.15 true role-strategy 2.16 true ruby-runtime 0.12 true run-condition 1.3 true scm-api 2.6.4 true script-security 1.76 true slack 2.41 true snakeyaml-api 1.27.0 true sse-gateway 1.24 true ssh-agent 1.20 true ssh-credentials 1.18.1 true ssh-slaves 1.31.3 true structs 1.21 true text-finder 1.15 true timestamper 1.11.8 true token-macro 2.12 true trilead-api 1.0.13 true variant 1.3 true view-job-filters 2.2 true warnings-ng 8.9.2 true windows-slaves 1.6 true workflow-aggregator 2.6 true workflow-api 2.41 true workflow-basic-steps 2.21 true workflow-cps 2.88 true workflow-cps-global-lib 2.17 true workflow-durable-task-step 2.35 true workflow-job 2.40 true workflow-multibranch 2.22 true workflow-scm-step 2.11 true workflow-step-api 2.23 true workflow-support 3.7 true ws-cleanup 0.39 true
To reproduce:
Part 1: Project setup
- Create a new freestyle project.
- Check the "Github project" checkbox and enter an HTTPS URL to a Github repo.
- In the "Source Code Management" section, select the "Git" radiobutton and enter the SSH URL for the Github repo from step 2, and provide relevant credentials to access it.
- In "Build Triggers", check the "GitHub hook trigger for GITScm polling" box.
Part 2: Triggering builds
Run the following script in the Github repo you used in part 1:
#!/usr/bin/env bash
git checkout -b branch-1
touch file-1
git add file-1
git commit -m 'adding file-1'
git checkout -b branch-2
touch file-2
git add file-2
git commit -m 'adding file-2'
git checkout branch-1
git push origin branch-1
git checkout branch-2
git push origin branch-2
This should trigger a build of both branch-1 and branch-2, but only triggers a build of branch-2. Looking at the Jenkins logs, I can see the following:
2021-08-20 07:49:20.977 UTC | 2021-08-20 07:49:20.976+0000 [id=388895] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/my-org/my-repo from 140.82.115.250 → 140.82.115.250 ⇒ https://my-jenkins/github-webhook/ |
2021-08-20 07:49:20.978 UTC | 2021-08-20 07:49:20.978+0000 [id=388895] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber$1#run: Poked my-project |
2021-08-20 07:49:22.131 UTC | 2021-08-20 07:49:22.131+0000 [id=10755] INFO c.c.jenkins.GitHubPushTrigger$1#run: SCM changes detected in my-project. Triggering #26 |
2021-08-20 07:49:23.018 UTC | 2021-08-20 07:49:23.017+0000 [id=394839] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/my-org/my-repo from 140.82.115.154 → 140.82.115.154 ⇒ https://my-jenkins/github-webhook/ |
2021-08-20 07:49:23.019 UTC | 2021-08-20 07:49:23.018+0000 [id=394839] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber$1#run: Poked my-project |
2021-08-20 07:49:24.162 UTC | 2021-08-20 07:49:24.162+0000 [id=19470] INFO c.c.jenkins.GitHubPushTrigger$1#run: SCM changes detected in my-project. Triggering #26 |
As you can see, two webhooks have been delivered from Github in quick succession for the two branches (I've checked the delivery logs on the Github side to verify this), but it looks like only one build has been triggered. I would have expected two builds to be triggered, one for each branch.