Can I use the multibranch pipeline plugin that interacts with a user at a stage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can I use the multibranch pipeline plugin that interacts with a user at a stage

paul b
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

Michael Pailloncy
Yeah, seems like you want to use the input step (interaction through Jenkins) : https://jenkins.io/doc/pipeline/steps/pipeline-input-step/

2017-07-04 9:49 GMT+02:00 paul b <[hidden email]>:
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPO77c3o%2B6-VEJ4ErxTRRYRDYHztReEhgNAOdL-Gz%3DKxE1ur%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

paul b
Brill.  Thanks. I will look into it.

On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
Yeah, seems like you want to use the input step (interaction through Jenkins) : <a href="https://jenkins.io/doc/pipeline/steps/pipeline-input-step/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fpipeline-input-step%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZ3EvDVlAfSmSzQcyKii5KSrsxqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fpipeline-input-step%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZ3EvDVlAfSmSzQcyKii5KSrsxqg&#39;;return true;">https://jenkins.io/doc/pipeline/steps/pipeline-input-step/
You can find a simple example here with some explanations : <a href="https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fpipeline-plugin%2Fblob%2Fmaster%2FTUTORIAL.md%23pausing-flyweight-vs-heavyweight-executors\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHI3BmSZYQryo55cvVSUg5m8DeAsQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fpipeline-plugin%2Fblob%2Fmaster%2FTUTORIAL.md%23pausing-flyweight-vs-heavyweight-executors\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHI3BmSZYQryo55cvVSUg5m8DeAsQ&#39;;return true;">https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors

2017-07-04 9:49 GMT+02:00 paul b <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="58F7DJuxAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pbla...@...>:
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="58F7DJuxAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ba706d38-4b6d-4d32-903d-3f630b489e07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

paul b
Brill.  I have managed to get that to work. I have the following stage

               stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}

The problem we have now is that the build consumes one of the executors.  I guess I can farm that off somehow??? 

On Tuesday, 4 July 2017 09:34:51 UTC+1, paul b wrote:
Brill.  Thanks. I will look into it.

On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
Yeah, seems like you want to use the input step (interaction through Jenkins) : <a href="https://jenkins.io/doc/pipeline/steps/pipeline-input-step/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fpipeline-input-step%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZ3EvDVlAfSmSzQcyKii5KSrsxqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fpipeline-input-step%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZ3EvDVlAfSmSzQcyKii5KSrsxqg&#39;;return true;">https://jenkins.io/doc/pipeline/steps/pipeline-input-step/
You can find a simple example here with some explanations : <a href="https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fpipeline-plugin%2Fblob%2Fmaster%2FTUTORIAL.md%23pausing-flyweight-vs-heavyweight-executors\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHI3BmSZYQryo55cvVSUg5m8DeAsQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fpipeline-plugin%2Fblob%2Fmaster%2FTUTORIAL.md%23pausing-flyweight-vs-heavyweight-executors\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHI3BmSZYQryo55cvVSUg5m8DeAsQ&#39;;return true;">https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors

2017-07-04 9:49 GMT+02:00 paul b <[hidden email]>:
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

Michael Pailloncy
It seems like you are using the Declarative way to write your pipeline right ? Can you share the full script please. I guess that you are allocating an agent at the top level.

2017-07-04 11:06 GMT+02:00 paul b <[hidden email]>:
Brill.  I have managed to get that to work. I have the following stage

               stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}

The problem we have now is that the build consumes one of the executors.  I guess I can farm that off somehow??? 

On Tuesday, 4 July 2017 09:34:51 UTC+1, paul b wrote:
Brill.  Thanks. I will look into it.

On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
Yeah, seems like you want to use the input step (interaction through Jenkins) : https://jenkins.io/doc/pipeline/steps/pipeline-input-step/

2017-07-04 9:49 GMT+02:00 paul b <[hidden email]>:
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPO77c2yad2TjJ3x06qWhY4JNUedWXX%3D1--Rs8xugPP7dXiEEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

paul b
Yeah.  Thats right.  Not tied to using that though.  Not sure why I need to push to using it yet though.

pipeline {
    agent any
    parameters {
        choice(choices: 'SIT\nUAT', description: 'What environment?', name: 'environment')
    }
    tools { 
        maven 'maven 3.3.9'
        //jdk 'jdk8' 
    }
    stages {
    stage ('build') {
steps {
echo 'build it.'
}
}
stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}
        stage('deploy to sit') {
            steps {
                echo 'push it to dev.'
            }
        }
        stage("deploy to uat") {
            steps {
                echo 'push it to uat.'
            }
        }
    }
}

On Tuesday, 4 July 2017 10:41:27 UTC+1, mpapo - Michael Pailloncy wrote:
It seems like you are using the Declarative way to write your pipeline right ? Can you share the full script please. I guess that you are allocating an agent at the top level.

2017-07-04 11:06 GMT+02:00 paul b <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="z8rWMi-3AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pbla...@...>:
Brill.  I have managed to get that to work. I have the following stage

               stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}

The problem we have now is that the build consumes one of the executors.  I guess I can farm that off somehow??? 

On Tuesday, 4 July 2017 09:34:51 UTC+1, paul b wrote:
Brill.  Thanks. I will look into it.

On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
Yeah, seems like you want to use the input step (interaction through Jenkins) : <a href="https://jenkins.io/doc/pipeline/steps/pipeline-input-step/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fpipeline-input-step%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZ3EvDVlAfSmSzQcyKii5KSrsxqg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fpipeline-input-step%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFZ3EvDVlAfSmSzQcyKii5KSrsxqg&#39;;return true;">https://jenkins.io/doc/pipeline/steps/pipeline-input-step/
You can find a simple example here with some explanations : <a href="https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fpipeline-plugin%2Fblob%2Fmaster%2FTUTORIAL.md%23pausing-flyweight-vs-heavyweight-executors\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHI3BmSZYQryo55cvVSUg5m8DeAsQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fpipeline-plugin%2Fblob%2Fmaster%2FTUTORIAL.md%23pausing-flyweight-vs-heavyweight-executors\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHI3BmSZYQryo55cvVSUg5m8DeAsQ&#39;;return true;">https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#pausing-flyweight-vs-heavyweight-executors

2017-07-04 9:49 GMT+02:00 paul b <[hidden email]>:
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="z8rWMi-3AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/05f9b2eb-aa91-4462-a9fc-91a99d46b4f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I use the multibranch pipeline plugin that interacts with a user at a stage

Michael Pailloncy
The "agent any" declaration at the top level of your pipeline indeed allocates an executor for the whole pipeline.
You can avoid this allocation with something like : 

pipeline {
    agent none
    parameters {
        choice(choices: 'SIT\nUAT', description: 'What environment?', name: 'environment')
    }
    stages {
        stage ('build') {
            agent any
            tools { 
                maven 'm3'
            }
            steps {
                echo 'build it.'
                sh "mvn --version"
            }
        }
        stage ('test') {            
            steps {
                echo 'test it.'
                input 'Ready to go?'        
            }   
        }       
        stage('deploy to sit') {
            steps {
                echo 'push it to dev.'
            }
        }
        stage("deploy to uat") {
            steps {
                echo 'push it to uat.'
            }
        }
    }
}

Or instead of tools section, you may prefer the withMaven syntax :

...
stage ('build') {
    agent any
    steps {
        echo 'build it.'
        withMaven(maven: 'm3') {
            sh "mvn --version"
        }
    }
}
...



2017-07-04 11:56 GMT+02:00 paul b <[hidden email]>:
Yeah.  Thats right.  Not tied to using that though.  Not sure why I need to push to using it yet though.

pipeline {
    agent any
    parameters {
        choice(choices: 'SIT\nUAT', description: 'What environment?', name: 'environment')
    }
    tools { 
        maven 'maven 3.3.9'
        //jdk 'jdk8' 
    }
    stages {
    stage ('build') {
steps {
echo 'build it.'
}
}
stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}
        stage('deploy to sit') {
            steps {
                echo 'push it to dev.'
            }
        }
        stage("deploy to uat") {
            steps {
                echo 'push it to uat.'
            }
        }
    }
}

On Tuesday, 4 July 2017 10:41:27 UTC+1, mpapo - Michael Pailloncy wrote:
It seems like you are using the Declarative way to write your pipeline right ? Can you share the full script please. I guess that you are allocating an agent at the top level.

2017-07-04 11:06 GMT+02:00 paul b <[hidden email]>:
Brill.  I have managed to get that to work. I have the following stage

               stage ('test') {
steps {
echo 'test it.'
input 'Ready to go?'
}
}

The problem we have now is that the build consumes one of the executors.  I guess I can farm that off somehow??? 

On Tuesday, 4 July 2017 09:34:51 UTC+1, paul b wrote:
Brill.  Thanks. I will look into it.

On Tuesday, 4 July 2017 08:59:13 UTC+1, mpapo - Michael Pailloncy wrote:
Yeah, seems like you want to use the input step (interaction through Jenkins) : https://jenkins.io/doc/pipeline/steps/pipeline-input-step/

2017-07-04 9:49 GMT+02:00 paul b <[hidden email]>:
I would like to use the multibranch pipeline plugin and wondered if it can be configured such that when it gets to a stage, lets says deploying to environment, it then interacts with a user.  That interaction being a through the jenkins, email or even jira!  Then after the user interaction response, I would expect it to push it onto the next stage!  Then possibly with further interactions at further stages.  Not sure if the plugin has this capability or even if it is good practice???  

Furthermore I would expect, when the branch is paused at a stage, I would expect that further branches can be pushed on too!

Hope all this makes sense.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1ad0acac-8a06-4ea8-84a0-d0de30c112b4%40googlegroups.com.
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/718db123-8f74-4fa7-a812-0736f0026965%40googlegroups.com.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/05f9b2eb-aa91-4462-a9fc-91a99d46b4f4%40googlegroups.com.

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPO77c2p3DdBEnTW44zdNVaHhFkNhjDrJT%3DBpPA3ycMkLOXn3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...