forked from jenkins-infra/datadog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_k8s
28 lines (27 loc) · 1.27 KB
/
Jenkinsfile_k8s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def dockerImage = 'jenkinsciinfra/hashicorp-tools:0.5.141' // Tracked by updatecli
parallel(
failFast: false,
'terraform': {
terraform(
stagingCredentials: [
// TODO: create an empty account for staging
string(variable: 'TF_VAR_datadog_api_key', credentialsId: 'datadog-api-key'),
string(variable: 'TF_VAR_datadog_app_key', credentialsId: 'datadog-app-key'),
string(variable: 'TF_VAR_datadog_jenkinsuser_password', credentialsId: 'datadog-jenkinsuser-password'),
file(variable: 'BACKEND_CONFIG_FILE', credentialsId: 'production-terraform-datadog-backend-config'),
],
productionCredentials: [
string(variable: 'TF_VAR_datadog_api_key', credentialsId: 'datadog-api-key'),
string(variable: 'TF_VAR_datadog_app_key', credentialsId: 'datadog-app-key'),
string(variable: 'TF_VAR_datadog_jenkinsuser_password', credentialsId: 'datadog-jenkinsuser-password'),
file(variable: 'BACKEND_CONFIG_FILE', credentialsId: 'production-terraform-datadog-backend-config'),
],
)
},
'updatecli': {
updatecli(action: 'diff', updatecliDockerImage: dockerImage)
if (env.BRANCH_IS_PRIMARY) {
updatecli(action: 'apply', cronTriggerExpression: '@daily', updatecliDockerImage: dockerImage)
}
},
)