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

Use idleMinutes in declarative pipelines

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: kubernetes-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.107.3
      kubernetes-plugin ver. 1.6.3
    • Similar Issues:

      Description

      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 !

        Attachments

          Activity

          i351654 Tom Marcuzzi created issue -
          csanchez Carlos Sanchez made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          csanchez Carlos Sanchez made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          csanchez Carlos Sanchez made changes -
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]

            People

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

              Dates

              Created:
              Updated:
              Resolved: