Pipeline-Maven-Plugin when current build status is UNSTABLE

32 views
Skip to first unread message

Benjamin Tocquec

unread,
Mar 21, 2019, 1:59:38 PM3/21/19
to Jenkins Users
Hi,

Here is my context.
I have a pipeline with main steps:
  • mvn clean deploy
  • mvn test
  • sonar quality gate
I choose to set currentBuild.result = 'UNSTABLE' if last step (quality gate from Sonar) is not OK.
I want my dependencies to build automatically downstream projects when SNAPSHOT.

Everything works well when quality gate is OK (means the job is SUCCESS):
If my newly SUCCESSed project A contains SNAPSHOTed dependencies B, I can see on "Downstream Jobs" of this dependency B the newly build project.
So, when I build this dependency B, on finished, job from project A is launched.

BUT

If my job from project A is UNSTABLE (by choice, forced in my pipeline), it will be no more referenced as a downstream Job from dependency B.
(so building B will no more trigger A)
I'd like this relationship not to be lost :/

Any help appreciated !
Thanks!

Benjamin Tocquec

unread,
Mar 21, 2019, 3:37:33 PM3/21/19
to Jenkins Users
Finally found the mistake/solution: my Sonar Stage was in a separated node. Groupingg every stages in same node solved my issue.

Thanks

Benjamin Tocquec

unread,
Mar 25, 2019, 4:40:57 AM3/25/19
to Jenkins Users
Not really closed !!!!!
For a new project, it won't be added to downstream list of its parent project unless its status is STABLE.

So in my case, when a new project compile but Sonar gate fails, it's marked as UNSTABLE and not present in downstream list of its parent.

Can someone help me please?

Cyrille Le Clerc

unread,
Apr 17, 2019, 5:20:55 AM4/17/19
to Jenkins Users
@Benjamin can you please create a jira issue, it's easier for us to follow up.

Benjamin Tocquec

unread,
Apr 18, 2019, 8:13:07 AM4/18/19
to Jenkins Users
Reply all
Reply to author
Forward
0 new messages