-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from lemeurherve/helpdesk2778-separate-update…
…cli-to-its-own-pipeline chore: separate updatecli to its own pipeline
- Loading branch information
Showing
3 changed files
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
github: | ||
user: "Jenkins Infra Bot (updatecli)" | ||
email: "[email protected]" | ||
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" | ||
|