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

Add an optional agent type to declarative Pipeline

XMLWordPrintable

      please enable a feature of optional selection of the agent type. So the same job could run according to the selected type as a parameter, something like that:

        when {
              expression { params.AGENT_TYPE == 'kubernetes' }
          }
        agent {
              kubernetes {defaultContainer 'my_k8s_template'}
          }
        when {
              expression { params.AGENT_TYPE == 'label' }
          }
          agent {
              label 'my_label'
          } 

       

            abdo123321 Menna
            dancho80 Dima Kreisserman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: