Running a series of jenkins agents without steps

2/18/2020

Can you write a jenkinsfile with a bunch of agents defined to run a series of kubernetes manifests without having to define any steps to be injected?

pipeline {
  agent none
  stages {
    stage('step1') {
      agent {
        kubernetes {
          yamlFile 'manifests/step1.yaml'
        }
      }
    },
    stage('step2') {
      agent {
        kubernetes {
          yamlFile 'manifests/step2.yaml'
        }
      }
    }
  }
}
-- mhumesf
jenkins
kubernetes

0 Answers