How can I write pipeline script to trigger a job and parameters from property files

1,886 views
Skip to first unread message

Alex 2013

unread,
Feb 15, 2018, 2:38:23 AM2/15/18
to Jenkins Users

  

   I have a jenkins pipeline and I want to have a post-build action which will trigger another job.

   That job is using parameters from property files. I wonder how I write this in the pipeline definition


   For example, below is trigger the job with a String parameter named 'systemname', thanks


   post {

          always {

                echo 'post build action'

                build job: 'metrics-report', parameters: [[$class: 'StringParameterValue', name: 'systemname', value: systemname]]

          }

    }

Victor Martinez

unread,
Feb 15, 2018, 7:47:45 AM2/15/18
to Jenkins Users
Reply all
Reply to author
Forward
0 new messages