![]() |
|
|
|
|
Change By:
|
nriffe
(29/Mar/13 4:12 PM)
|
|
Description:
|
I have a single job configured to build all branches of a git repo and poll for changes, and I have been experiencing a bug with build triggering.
h3. Steps to reproduce
# Create a new repo locally and run these in the repo: {code} touch somefile.txt git commit -m "Add a file" somefile.txt {code} # Create a new repo on github # Create a Jenkins job with this configuration: ** Set 'Repository URL' to the new github repo ** Set 'Branches to build' to '**' ** Check 'Prune remote branches before build', 'Skip internal tag', 'Clean after checkout', 'Recursively update submodules', 'Wipe out workspace before build' ** Check 'Poll SCM' ** Set 'Schedule' to '* * * * *'
# Push the master branch of your local repo to github #
**
Add the following shell script as a build step:
{code}echo $GIT_BRANCH{code} #
Push the master branch of your local repo to github #
Wait for Jenkins build (build #1) # Run these in your local repo: {code} git checkout -b feature master echo stuff > somefile.txt git commit -m "Some changes" somefile.txt git push origin feature {code} # Wait for Jenkins build (build #2) # Run these in your local repo: {code} git checkout master git merge feature git push origin master {code}
h3. What happens
After step
6
5
, build #1 prints 'origin/master'. After step
8
7
, build #2 prints 'origin/feature'. After step
9
8
, nothing happens in Jenkins.
h3. What should happen
Builds #1 and #2 are fine. There should be a build #3 after step
9
8
which prints 'origin/master'.
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/groups/opt_out.