Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add idleMinutes to pod template in declarative pipeline #336

Merged
merged 1 commit into from May 29, 2018

Conversation

Projects
None yet
2 participants
@tmarcuzz
Copy link

tmarcuzz commented May 29, 2018

Implement JENKINS-51569

How to use it in a declarative pipeline :

pipeline {
  agent {
    kubernetes {
      label 'myLabel'
      idleMinutes 10
      yaml '''
apiVersion: v1
kind: Pod
metadata:
  labels:
    some-label: some-label-value
spec:
  containers:
  - name: jnlp
    image: myDocker/jnlp:3.7-1-alpine
    args: 
    - ${computer.jnlpmac} ${computer.name}
    tty: true
'''
    }
  }
    stages {
        stage ('myStage') {
            steps {
                script {
                    echo "coucou"
                }
            }
        }
    }
}
Add idleMinutes to pod template in declarative pipeline
Implement [JENKINS-51569](https://issues.jenkins-ci.org/browse/JENKINS-51569)

How to use it in a declarative pipeline :

```
pipeline {
  agent {
    kubernetes {
      label 'myLabel'
      idleMinutes 10
      yaml '''
apiVersion: v1
kind: Pod
metadata:
  labels:
    some-label: some-label-value
spec:
  containers:
  - name: jnlp
    image: myDocker/jnlp:3.7-1-alpine
    args: 
    - ${computer.jnlpmac} ${computer.name}
    tty: true
'''
    }
  }
    stages {
        stage ('myStage') {
            steps {
                script {
                    echo "coucou"
                }
            }
        }
    }
}
```

@carlossg carlossg merged commit d449569 into jenkinsci:master May 29, 2018

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details

@tmarcuzz tmarcuzz deleted the tmarcuzz:patch-1 branch May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.