Skip to content

Commit

Permalink
Align prowjobs running terraform executor with secrets rotator applic…
Browse files Browse the repository at this point in the history
…ation tf config. (#7129)

* Aligned tf prowjob paths with application tf modules structure.

* Aligned tf prowjob run_if_changed paths with application tf modules structure.
  • Loading branch information
dekiel authored Mar 6, 2023
1 parent 49ef4d8 commit 9e75d26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions prow/jobs/test-infra/secrets-rotator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ presubmits: # runs on PRs
prow.k8s.io/pubsub.runID: "pull-secrets-rotator-tf-plan"
prow.k8s.io/pubsub.topic: "prowjobs"
preset-bot-github-token: "true"
run_if_changed: '^development/secrets-rotator/terraform'
run_if_changed: '^development/secrets-rotator/terraform/environments/prod|^development/secrets-rotator/terraform/modules'
skip_report: false
decorate: true
cluster: trusted-workload
Expand All @@ -116,7 +116,7 @@ presubmits: # runs on PRs
- "/bin/sh"
args:
- "-c"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -pr $PULL_NUMBER -sha $PULL_PULL_SHA plan -- terraform -chdir=./development/secrets-rotator/terraform plan -input=false"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform/environments/prod init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -pr $PULL_NUMBER -sha $PULL_PULL_SHA plan -- terraform -chdir=./development/secrets-rotator/terraform/environments/prod plan -input=false -var-file=./terraform.tfvars"
resources:
requests:
memory: 3Gi
Expand Down Expand Up @@ -226,7 +226,7 @@ postsubmits: # runs on main
prow.k8s.io/pubsub.project: "sap-kyma-prow"
prow.k8s.io/pubsub.runID: "post-secrets-rotator-tf-apply"
prow.k8s.io/pubsub.topic: "prowjobs"
run_if_changed: '^development/secrets-rotator/terraform'
run_if_changed: '^development/secrets-rotator/terraform/environments/prod|^development/secrets-rotator/terraform/modules'
skip_report: false
decorate: true
cluster: trusted-workload
Expand All @@ -245,7 +245,7 @@ postsubmits: # runs on main
- "/bin/sh"
args:
- "-c"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -sha $PULL_BASE_SHA apply -- terraform -chdir=./development/secrets-rotator/terraform apply -input=false -auto-approve"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform/environments/prod init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -sha $PULL_BASE_SHA apply -- terraform -chdir=./development/secrets-rotator/terraform/environments/prod apply -input=false -auto-approve -var-file=./terraform.tfvars"
resources:
requests:
memory: 3Gi
Expand Down
8 changes: 4 additions & 4 deletions templates/data/test-infra/secrets-rotator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ templates:
- jobConfig:
privileged: "false"
name: "pull-secrets-rotator-tf-plan"
run_if_changed: '^development/secrets-rotator/terraform'
run_if_changed: '^development/secrets-rotator/terraform/environments/prod|^development/secrets-rotator/terraform/modules'
image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/terraform:v20230215-6bf03a31"
serviceAccountName: "prow-terraform-executor"
automountServiceAccountToken: true
Expand All @@ -79,7 +79,7 @@ templates:
command: "/bin/sh"
args:
- "-c"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -pr $PULL_NUMBER -sha $PULL_PULL_SHA plan -- terraform -chdir=./development/secrets-rotator/terraform plan -input=false"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform/environments/prod init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -pr $PULL_NUMBER -sha $PULL_PULL_SHA plan -- terraform -chdir=./development/secrets-rotator/terraform/environments/prod plan -input=false -var-file=./terraform.tfvars"
inheritedConfigs:
global:
- "jobConfig_default"
Expand All @@ -88,7 +88,7 @@ templates:
- jobConfig:
privileged: "false"
name: "post-secrets-rotator-tf-apply"
run_if_changed: '^development/secrets-rotator/terraform'
run_if_changed: '^development/secrets-rotator/terraform/environments/prod|^development/secrets-rotator/terraform/modules'
image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/terraform:v20230215-6bf03a31"
serviceAccountName: "prow-terraform-executor"
automountServiceAccountToken: true
Expand All @@ -97,7 +97,7 @@ templates:
command: "/bin/sh"
args:
- "-c"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -sha $PULL_BASE_SHA apply -- terraform -chdir=./development/secrets-rotator/terraform apply -input=false -auto-approve"
- "/bin/terraform -chdir=./development/secrets-rotator/terraform/environments/prod init -input=false && /tfcmt/tfcmt -owner $REPO_OWNER -repo $REPO_NAME -sha $PULL_BASE_SHA apply -- terraform -chdir=./development/secrets-rotator/terraform/environments/prod apply -input=false -auto-approve -var-file=./terraform.tfvars"
inheritedConfigs:
global:
- "jobConfig_default"
Expand Down

0 comments on commit 9e75d26

Please sign in to comment.