Or you could more simply do a `if (env.BRANCH_NAME == "master"){}` and do
the maven release in this block. Then all you need is to merge into master
to make Jenkins do the release.

Le mar. 21 févr. 2017 à 10:39, Erwan QUEINNEC <[email protected]> a
écrit :

> Thanks Adrien
> Creating a release branch could solve the problem yes.
> But I have to check the impact of the git-flow approach as we have many
> projects and teams using the maven approach...
>
> Le mardi 21 février 2017 10:23:11 UTC+1, Adrien Lecharpentier a écrit :
>
> Hello,
>
> the problem is that milestone is independent of Maven. The release in two
> steps is a maven "problem". What you could do is use the git-flow approach
> and do the real release in separate branch (or in master). You could even
> use https://bitbucket.org/atlassian/jgit-flow/wiki/Home to automate this.
>
> -- Adrien
>
> Le mar. 21 févr. 2017 à 10:06, Erwan QUEINNEC <[email protected]> a
> écrit :
>
> Hi
> If I implement milestone in stage like:
> https://jenkins.io/blog/2016/10/16/stage-lock-milestone/
>
> stage('Build') {
>   milestone()
>   echo "Building"
> }
> stage('Test') {
>   milestone()
>   echo "Testing"
> }
>
> And I execute a release: maven release:prepare -DreleaseVersion=X -Dtag=X
> -DdevelopmentVersion=X-SNAPSHOT
> Jenkins will execute 2 concurrent builds:
> build 1 with pom using version=X    => the release: we want release
> artifacts created and full pipeline
> build 2 with pom using version=SNAPSHOT
> The problem with milestone is jenkins will not execute sometimes the
> release build 1 as build 2 is newer and do not deploy 'release' artifact
> and the full pipeline like a docker image.
> What could be the recommendation using milestone?
> Request could be milestone do not kill 'release' build. Just optimize
> snapshot builds
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/306bf80c-4144-45a8-ace8-f93dfadf3bef%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/306bf80c-4144-45a8-ace8-f93dfadf3bef%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/f12af20b-94fc-4bb5-9c9b-cdbd98b0316b%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/f12af20b-94fc-4bb5-9c9b-cdbd98b0316b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKwJSvx07znyrRfFp9krSmzXfcGHajFyiEB8NZcdkJW%3DE9oQNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to