[pipeline][groovy postbuild] Groovy manager access

111 views
Skip to first unread message

jer...@bodycad.com

unread,
Jul 13, 2016, 11:44:03 AM7/13/16
to Jenkins Users
Hi,

I try to translate my Groovy PostBuild to pipeline:

if(manager.build.result.isBetterOrEqualTo(hudson.model.Result.SUCCESS)) 
{
    manager.addShortText("${manager.build.buildVariables.get('APPLY_TAG')}")
}

I was thinking about using this:

if(manager.build.result.isBetterOrEqualTo(hudson.model.Result.SUCCESS)) 
{
manager.addShortText("${APPLY_TAG}");
}

But it doesn't work. Anyone have any idea?

Jerome

jer...@bodycad.com

unread,
Aug 15, 2016, 12:03:48 PM8/15/16
to Jenkins Users
If anybody ever wonder it's the following:
if(currentBuild.result == 'SUCCESS')
{
   manager.addShortText("${APPLY_TAG}")
}

Not sure the isBetterOrEqualTo() is still available somewhere.
Reply all
Reply to author
Forward
0 new messages