[JIRA] (JENKINS-46894) Provide means of detecting cause of build from declarative pipeline

1 view
Skip to first unread message

andrew.bayer@gmail.com (JIRA)

unread,
Nov 7, 2018, 12:21:02 PM11/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Improvement JENKINS-46894
 
Re: Provide means of detecting cause of build from declarative pipeline

Feels like this could be done as a when condition utilizing https://github.com/jenkinsci/workflow-support-plugin/pull/78 - in post usage, you could do a script block and check the currentBuild.getBuildCauses() list for what you care about.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

andrew.bayer@gmail.com (JIRA)

unread,
Nov 7, 2018, 12:21:04 PM11/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
 
Jenkins / Improvement JENKINS-46894
Change By: Andrew Bayer
Component/s: declarative-pipeline-when-conditions-plugin

jtaboada@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 10:48:03 AM11/29/18
to jenkinsc...@googlegroups.com

jtaboada@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 10:48:03 AM11/29/18
to jenkinsc...@googlegroups.com
Status: Open In Progress

jtaboada@cloudbees.com (JIRA)

unread,
Dec 7, 2018, 5:04:02 AM12/7/18
to jenkinsc...@googlegroups.com

jtaboada@cloudbees.com (JIRA)

unread,
Dec 7, 2018, 5:08:02 AM12/7/18
to jenkinsc...@googlegroups.com
Jose Blas Camacho Taboada commented on Improvement JENKINS-46894
 
Re: Provide means of detecting cause of build from declarative pipeline

This feature was implemented using run.getCauses() within a script in Utils.groovy

andrew.bayer@gmail.com (JIRA)

unread,
Dec 10, 2018, 11:59:02 AM12/10/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated Improvement JENKINS-46894
 

Merged, will be in 1.3.4.

Change By: Andrew Bayer
Status: In Review Resolved
Resolution: Fixed

costincaraivan@gmail.com (JIRA)

unread,
Dec 14, 2018, 5:56:02 AM12/14/18
to jenkinsc...@googlegroups.com
Costin Caraivan commented on Improvement JENKINS-46894
 
Re: Provide means of detecting cause of build from declarative pipeline

Andrew Bayer Is this documented somewhere? How do we use this? Thanks!

 

jtaboada@cloudbees.com (JIRA)

unread,
Dec 14, 2018, 10:21:02 AM12/14/18
to jenkinsc...@googlegroups.com

Costin Caraivan, you can check the documentation here: https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline

And an example is: 

when { triggeredBy 'SCMTrigger' }

or TimerTrigger

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:43 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages