-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle Jenkinsfile needs merge and/or Jenkinsfile have changed on integration branch #59
Comments
Will be problematic for 100% of users, as this seems to be the usual way write scripted pipeline jobs. I have a commit on a ready branch, with an updated Jenkinsfile. It is different from the one on master. Problem is shown here in this pipeline job in the UI - what happens is we use a git extension to merge our ready-branch with master before we "build" the pipeline from In the above example we show it using usual git extension behavior, but our pretested integration git extension have the same problem. |
Deliveries expectedDocumentation about this can be pitfall and what the user should be aware of. It can be said in about 2-3 lines.... similar to:
We conclude we can't solve the problem as we can't detect safely if the pipeline is changed. This is because that even though we could check in git if there are changesets on the pipeline description file, we can't know about any includes in the groovy syntax, so we can't sure detect it. We also discussed that it might no be our problem to solve, as all other plugins that merges workspaces work this way. The pitfall is the same. So solution is when you write your jobs, you would in case you will have to handle all scenarios, have to make sure that the pipeline job merges, and that all stages then use the same merged workspace. I'm adjusting estimates to fit the delivery. |
Is this something we would add to the official documentation, or can we just close this issue |
Yes, we will need to add it to the official docs, but it is a rare case so we will do our pre-release first. |
docs for the Jenkinsfile @MadsNielsen @buep Changes in the
|
Closing, I reference the documentation in #96 so we remember to copy paste in what you prepared above for us. |
Issue
It is important that we handle this scenario (comment) which is mentioned on the Git Plugin PreMerge feature. The Jenkinsfile might not merged before loaded..: https://gist.github.com/martinda/b2ece95c2c71ddb4d4a762f0a02561b3#gistcomment-2016232
In case the Pipeline script is loaded via SCM and does not have Git Phlow or Merge extension enabled then the "wrong" Pipeline is executed in the following scenario:
The text was updated successfully, but these errors were encountered: