it doesn't make sense to retain a slave declared in pipeline, as it is
supposed to run only for the operations inside its brackets

On Fri, May 12, 2017 at 3:32 AM, 李立 <dylan-l...@foxmail.com> wrote:

> I see the the property of "Time in minutes to retain slave when idle" in
> jenkins configure when I use Kubernetes plugin. But I want to configure
> this property in podTemplate, just as
>
> podTemplate(label: 'mypod', containers: [
>     containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', 
> ttyEnabled: true, command: 'cat'),
>     containerTemplate(name: 'golang', image: 'golang:1.6.3', ttyEnabled: 
> true, command: 'cat')
>   ]) {
>
>     node('mypod') {
>         stage('Get a Maven project') {
>             git 'https://github.com/jenkinsci/kubernetes-plugin.git'
>             container('maven') {
>                 stage('Build a Maven project') {
>                     sh 'mvn clean install'
>                 }
>             }
>         }
>
>         stage('Get a Golang project') {
>             git url: 'https://github.com/hashicorp/terraform.git'
>             container('golang') {
>                 stage('Build a Go project') {
>                     sh """                    mkdir -p 
> /go/src/github.com/hashicorp                    ln -s `pwd` 
> /go/src/github.com/hashicorp/terraform                    cd 
> /go/src/github.com/hashicorp/terraform && make core-dev                    """
>                 }
>             }
>         }
>
>     }
> }
>
>
> How to set the Time in minutes to retain slave when idle in mypod ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/f64a56a6-9e79-468c-82e9-762f40693c86%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/f64a56a6-9e79-468c-82e9-762f40693c86%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 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CALHFn6N0-%2B5NO_tQvUWsW8vN_vJ3TTEmL-X6X-6mLDFArqhpRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to