|
||||||||
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We have poll scm setup to poll our repos every 5 minutes. For example, we specific a job to poll origin/master for a specific project. The plugin would successfully find a new commit at the HEAD and start a new build, and create a new artifact (even referencing the new commit hash in the manifest of the artifact - using maven). When we deployed the artifact we discovered the new code didn't actually get added, even though it shows it was built off the recent commit hash.
I never found the culprit,but what I did find out is this issue is resolved by enabling 'wipe out repository and force new clone'. During my analysis before making this setting change I saw in the logs it ran a simple 'git fetch'. I assumed what was happening is it was pulling down the changes from origin, but not merging them into our local branches, that Jenkins actually builds from on the file system. This is why I recommended to change it to a 'git pull'. However, our company was running a really old version of git plugin and git client plugin.
We updated the git plugin from 2.0 to 2.2.1 and client plugin from 1.45 to 1.90.
Now in the console output, I see it runs a 'git checkout -f commit' so hopefully that was cuasing the issues (it wasn't forcing the checkout). Although we should never have situations where a force is required.
Long story short, the main goal here would be to able to disable the advanced feature of 'wipe out repository and force clone' and not have to worry that our artifacts won't have the code from the most recent commit (tip of branch).
I'll try disabling this feature for some of our builds now that we have new versions, to see if I can reproduce. Hopefully I can reproduce this and we can go from there. But I'd really like to know why there is a feature 'wipe out repository and force clone' it must be to work around something, correct? It's really not ideal to clone an entire 8gb repository everytime we need a new build.