Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51569

Use idleMinutes in declarative pipelines

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • Jenkins ver. 2.107.3
      kubernetes-plugin ver. 1.6.3

      We would like to use the option idleMinutes in declaratives pipelines.

      Indeed, we would like to reuse the created pod for other builds, since it takes some time to instantiate.

      We tried this, but were unsuccessful :

       

      agent {
        kubernetes {
          label 'mylabel'
          defaultContainer 'jnlp'
          yaml '''
      apiVersion: v1
      kind: Pod
      metadata:
       labels:
       some-label: some-label-value
      spec:
       containers:
       - name: jnlp
       image: my-docker.corp:42/jnlp:3.7-1-alpine
       args: 
       - ${computer.jnlpmac} ${computer.name}
       tty: true
       idleMinutes: 20
      '''

       

      Is there a way to do so ? If no, that would be a great feature !

      Thanks !

            csanchez Carlos Sanchez
            i351654 Tom Marcuzzi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: