This is how I do this, should be easy enough -

pipeline {
stages {
        stage ('xxx') {
            steps {
...
...
                build job: '<job-name-here>', parameters: [
                    string(name: 'PARAM1', value: "xxx"),
                    string(name: 'PARAM2, value: "yyy")
                ]
            }
      }
}


On Wed, Apr 12, 2017 at 10:53 AM Idan Adar <[email protected]> wrote:

> Hi,
>
> Lets assume there are two job:
>
> 1. a job for a micro-service repository
> 2. a job for end-to-end tests
>
> I'd like, in specific cases, to start the end-to-end tests job from the
> micro-service job.
> For example, after introducing a change that even though passed unit
> testing and integration testing, it needs further testing, available in the
> end-to-end tests job.
>
> I'd like for the developers to make a commit with a specific phrase, e.g.
> "[e2e]" and to use it as follows (just pseudo code for now).
>
> pipeline {
>     ...
>     ...
>     stages {
>         ...
>     }
>
>
>     post {
>         success {
>             if (BRANCH_NAME == "develop") {
>                 result = sh (script: "git log -1 | grep '.*\\[e2e\\].*'",
> returnStatus: true)
>                 if (result == 0) {
>                     // start the d2d job
>                 }
>             }
>         }
>     ...
>     ...
>     }
> }
>
>
>
> --
> 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/db4e7ca4-4a8b-4a70-ae49-6595eda541b7%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/db4e7ca4-4a8b-4a70-ae49-6595eda541b7%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/CAObRFCULUPpX-dhmKrEmLY7XeLPzTrvt_DBKgm2_-3S2rQGBoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to