Skip to content

Commit

Permalink
[feature/PI-165-environments] add cache scoping to deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaklinger committed Dec 29, 2023
1 parent 82e961a commit 19f82e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:
env:
ACCOUNT: ${{ inputs.account }}
WORKSPACE: ${{ inputs.workspace }}
CACHE_NAME: ${{ inputs.workspace }}-cache
CACHE_NAME: ${{ inputs.workspace }}-${{ inputs.account }}-${{ inputs.scope }}
SCOPE: ${{ inputs.scope }}
# SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_ENV_SLACK_HOOK_URL }}
CI_ROLE_NAME: ${{ secrets.CI_ROLE_NAME }}
Expand Down Expand Up @@ -60,6 +60,7 @@ jobs:
command: build
save-to-cache: "true"
restore-from-cache: "false"
cache-suffix: ${{ env.CACHE_NAME }}

helpers--truststore-pull:
needs: [get-branch-from-workflow-file, build]
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
scope: ${{ env.SCOPE }}
restore-from-cache: "true"
save-to-cache: "true"
cache-suffix: ${{ env.CACHE_NAME }}

terraform--plan:
needs: [get-branch-from-workflow-file, terraform--init]
Expand All @@ -103,6 +105,7 @@ jobs:
scope: ${{ env.SCOPE }}
restore-from-cache: "true"
save-to-cache: "true"
cache-suffix: ${{ env.CACHE_NAME }}

terraform--apply:
needs: [get-branch-from-workflow-file, terraform--plan]
Expand All @@ -119,6 +122,7 @@ jobs:
scope: ${{ env.SCOPE }}
restore-from-cache: "true"
save-to-cache: "true"
cache-suffix: ${{ env.CACHE_NAME }}

test--smoke:
needs: [get-branch-from-workflow-file, terraform--apply]
Expand Down

0 comments on commit 19f82e9

Please sign in to comment.