diff --git a/Jenkinsfile_k8s b/Jenkinsfile_k8s index a096ae7992..2cec83558f 100644 --- a/Jenkinsfile_k8s +++ b/Jenkinsfile_k8s @@ -14,16 +14,56 @@ pipeline { } stages { - stage('Yaml Lint') { - agent { - kubernetes { - yamlFile 'PodTemplates.yaml' - } - } - steps { - sh 'yamllint --config-file yamllint.config config' - } - } // stage 'Yaml Lint' + stage('Chore Tasks') { + parallel { + stage('Dependency Management') { + agent { + kubernetes { + yamlFile 'PodTemplates.yaml' + } + } + environment { + AWS_ACCESS_KEY_ID = credentials('packer-aws-access-key-id') + AWS_SECRET_ACCESS_KEY = credentials('packer-aws-secret-access-key') + AWS_DEFAULT_REGION = 'us-east-2' + } + stages { + stage('Check Configuration Update') { + // Run updatecli's diff on both push and pull requests (in case a configuration change breaks updatecli) + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + updatecli(action: 'diff', cronTriggerExpression: cronExpr, + updatecliDockerImage: 'jenkinsciinfra/helmfile:2.4.66', // Tracked by updatecli + ) + } + } + } // stage + stage('Apply Configuration Update') { + when { + expression { env.BRANCH_IS_PRIMARY } + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + updatecli(action: 'apply', cronTriggerExpression: cronExpr, + updatecliDockerImage: 'jenkinsciinfra/helmfile:2.4.66', // Tracked by updatecli, + ) + } + } + } // stage + } + } // stage 'Dependency Management' + stage('Yaml Lint') { + agent { + kubernetes { + yamlFile 'PodTemplates.yaml' + } + } + steps { + sh 'yamllint --config-file yamllint.config config' + } + } // stage 'Yaml Lint' + } // parallel + } // stage 'Chore Tasks stage('Kubernetes Management Tasks') { matrix { axes { diff --git a/Jenkinsfile_updatecli b/Jenkinsfile_updatecli deleted file mode 100644 index b8ce6ee764..0000000000 --- a/Jenkinsfile_updatecli +++ /dev/null @@ -1,49 +0,0 @@ -def cronExpr = env.BRANCH_IS_PRIMARY ? 'H/30 * * * *' : '' - -pipeline { - agent { - kubernetes { - yamlFile 'PodTemplates.yaml' - } - } - - options { - buildDiscarder(logRotator(numToKeepStr: '10')) - timeout(time: 30, unit: 'MINUTES') - disableConcurrentBuilds() - } - - triggers { - cron (cronExpr) - } - - environment { - AWS_ACCESS_KEY_ID = credentials('packer-aws-access-key-id') - AWS_SECRET_ACCESS_KEY = credentials('packer-aws-secret-access-key') - AWS_DEFAULT_REGION = 'us-east-2' - } - stages { - stage('Check Configuration Update') { - // Run updatecli's diff on both push and pull requests (in case a configuration change breaks updatecli) - steps { - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - updatecli(action: 'diff', cronTriggerExpression: cronExpr, - updatecliDockerImage: 'jenkinsciinfra/helmfile:2.4.60', // Tracked by updatecli - ) - } - } - } // stage - stage('Apply Configuration Update') { - when { - expression { env.BRANCH_IS_PRIMARY } - } - steps { - catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - updatecli(action: 'apply', cronTriggerExpression: cronExpr, - updatecliDockerImage: 'jenkinsciinfra/helmfile:2.4.60', // Tracked by updatecli, - ) - } - } - } - } -} diff --git a/config/ext_jenkins-infra-jobs.yaml b/config/ext_jenkins-infra-jobs.yaml index 53d62622b7..25f0aadece 100644 --- a/config/ext_jenkins-infra-jobs.yaml +++ b/config/ext_jenkins-infra-jobs.yaml @@ -124,17 +124,6 @@ jobsDefinition: helm-charts: name: Helm Charts description: Custom Helm Charts of the Jenkins Infra - updatecli: - name: Kubernetes Management Dependencies - kind: folder - credentials: - # Used by updatecli to retrieve AMIs - packer-aws-access-key-id: *packer-aws-access-key-id-def - # Used by updatecli to retrieve AMIs - packer-aws-secret-access-key: *packer-aws-secret-access-key-def - children: - kubernetes-management: - jenkinsfilePath: Jenkinsfile_updatecli other-jobs: name: Other Jobs description: Folder hosting all the jobs not fitting any category diff --git a/updatecli/updatecli.d/pod-templates/helmfile.yaml b/updatecli/updatecli.d/pod-templates/helmfile.yaml index 71aa13d052..c4e24f9826 100644 --- a/updatecli/updatecli.d/pod-templates/helmfile.yaml +++ b/updatecli/updatecli.d/pod-templates/helmfile.yaml @@ -54,7 +54,7 @@ targets: name: Update docker-helmfile in Jenkinsfile kind: file spec: - file: Jenkinsfile_updatecli + file: Jenkinsfile_k8s # Please note that the patterns are specified as "block scalars" (>) with the last endline trimmed (-) to avoid tedious escaping of simple quotes matchpattern: >- 'jenkinsciinfra/helmfile:(.*)' @@ -72,4 +72,3 @@ pullrequests: spec: labels: - dependencies - - docker-helmfile