diff --git a/Jenkinsfile_k8s b/Jenkinsfile_k8s index 115516e..b751be2 100644 --- a/Jenkinsfile_k8s +++ b/Jenkinsfile_k8s @@ -1,23 +1,18 @@ -parallel( - failFast: false, - 'terraform': { - terraform( - // "Read only" token - stagingCredentials: [ - string(variable: 'FASTLY_API_KEY', credentialsId:'staging-terraform-fastly-api-key'), - file(variable: 'BACKEND_CONFIG_FILE', credentialsId: 'staging-terraform-fastly-backend-config'), - ], - // "Read write" token - productionCredentials: [ - string(variable: 'FASTLY_API_KEY', credentialsId:'production-terraform-fastly-api-key'), - file(variable: 'BACKEND_CONFIG_FILE', credentialsId: 'production-terraform-fastly-backend-config'), - ], - ) - }, - 'updatecli': { - updatecli(action: 'diff') - if (env.BRANCH_IS_PRIMARY) { - updatecli(action: 'apply', cronTriggerExpression: '@daily') - } - }, +if (env.BRANCH_IS_PRIMARY) { + // Only trigger a daily check on the principal branch + properties([pipelineTriggers([cron('@daily')])]) +} + +terraform( + // "Read only" token + stagingCredentials: [ + string(variable: 'FASTLY_API_KEY', credentialsId:'staging-terraform-fastly-api-key'), + file(variable: 'BACKEND_CONFIG_FILE', credentialsId: 'staging-terraform-fastly-backend-config'), + ], + // "Read write" token + productionCredentials: [ + string(variable: 'FASTLY_API_KEY', credentialsId:'production-terraform-fastly-api-key'), + file(variable: 'BACKEND_CONFIG_FILE', credentialsId: 'production-terraform-fastly-backend-config'), + ], + // publishReports: ['jenkins-infra-data-reports/fastly.json'], ) diff --git a/Jenkinsfile_updatecli b/Jenkinsfile_updatecli new file mode 100644 index 0000000..6b89b7c --- /dev/null +++ b/Jenkinsfile_updatecli @@ -0,0 +1,7 @@ +updatecli(action: 'diff') + +if (env.BRANCH_IS_PRIMARY) { + // Only trigger a daily check on the principal branch + properties([pipelineTriggers([cron('@daily')])]) + updatecli(action: 'apply') +} diff --git a/updatecli/values.yaml b/updatecli/values.yaml index ed477cc..43f32d7 100644 --- a/updatecli/values.yaml +++ b/updatecli/values.yaml @@ -1,7 +1,7 @@ +--- github: - user: "Jenkins Infra Bot (updatecli)" - email: "60776566+jenkins-infra-bot@users.noreply.github.com" - username: "jenkins-infra-bot" + user: "jenkins-infra-updatecli" + email: "178728+jenkins-infra-updatecli[bot]@users.noreply.github.com" token: "UPDATECLI_GITHUB_TOKEN" branch: "main" owner: "jenkins-infra"