Skip to content

Commit

Permalink
Merge pull request #673 from NHSDigital/feature/axkr1-NRL-817-permiss…
Browse files Browse the repository at this point in the history
…ions-cache

NRL-817 permissions cache
  • Loading branch information
axelkrastek1-nhs authored Jul 9, 2024
2 parents f63fb02 + b896b3d commit 84c21ba
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/persistent-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/*.zip
path: |
dist/*.zip
!dist/nrlf_permissions.zip
- name: Save NRLF Permissions cache
uses: actions/cache/save@v4
with:
key: ${{ github.run_id }}-nrlf-permissions
path: dist/nrlf_permissions.zip

terraform-plan:
name: Terraform Plan - ${{ inputs.environment }}
Expand Down Expand Up @@ -126,6 +134,13 @@ jobs:
poetry install --no-root
source $(poetry env info --path)/bin/activate
- name: Restore NRLF permissions cache
uses: actions/cache/restore@v4
with:
key: ${{ github.run_id }}-nrlf-permissions
path: dist/nrlf_permissions.zip
fail-on-cache-miss: true

- name: Terraform Init
run: |
inactive_stack=$(poetry run python ./scripts/get_env_config.py inactive-stack ${{ inputs.environment }})
Expand Down Expand Up @@ -177,6 +192,13 @@ jobs:
name: build-artifacts
path: dist

- name: Restore NRLF permissions cache
uses: actions/cache/restore@v4
with:
key: ${{ github.run_id }}-nrlf-permissions
path: dist/nrlf_permissions.zip
fail-on-cache-miss: true

- name: Configure Management Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/pr-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/*.zip
path: |
dist/*.zip
!dist/nrlf_permissions.zip
- name: Save NRLF Permissions cache
uses: actions/cache/save@v4
with:
key: ${{ github.run_id }}-nrlf-permissions
path: dist/nrlf_permissions.zip

- name: Add Failure Pull Request Comment
uses: actions/github-script@v7
Expand Down Expand Up @@ -143,6 +151,13 @@ jobs:
name: build-artifacts
path: dist

- name: Restore NRLF permissions cache
uses: actions/cache/restore@v4
with:
key: ${{ github.run_id }}-nrlf-permissions
path: dist/nrlf_permissions.zip
fail-on-cache-miss: true

- name: Retrieve Server Certificates
run: make truststore-pull-server ENV=dev

Expand Down

0 comments on commit 84c21ba

Please sign in to comment.