Skip to content

Commit

Permalink
Merge pull request #847 from govuk-one-login/ATO-807
Browse files Browse the repository at this point in the history
ATO-807: Updated node version in lambdas
  • Loading branch information
kalpaitch authored Aug 2, 2024
2 parents 770c244 + 9b77792 commit 6633f18
Show file tree
Hide file tree
Showing 5 changed files with 2,252 additions and 1,479 deletions.
46 changes: 0 additions & 46 deletions .github/actions/build-frontend/action.yml

This file was deleted.

38 changes: 32 additions & 6 deletions .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,28 @@ permissions:
contents: read

jobs:
get-head-commit:
name: Get head commit
runs-on: ubuntu-latest
outputs:
commit-message: ${{ steps.get-head-commit.outputs.commit-message }}
steps:
- name: Checkout Commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Get Head Commit Message
id: get-head-commit
run: echo "commit-message=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"

- name: Show commit message
run: echo "Git commit message \`$(git show -s --format=%s)\`" >> $GITHUB_STEP_SUMMARY

push-frontend-image:
if: contains(github.event.head_commit.message, '[deploy]') == true
if: contains(needs.get-head-commit.outputs.commit-message, '[deploy]') == true
name: Push frontend image
needs: get-head-commit
runs-on: ubuntu-latest
environment:
name: demo
Expand All @@ -46,9 +65,9 @@ jobs:
dockerfile: infrastructure/frontend/Dockerfile

deploy-frontend:
if: contains(github.event.head_commit.message, '[deploy]') == true
if: contains(needs.get-head-commit.outputs.commit-message, '[deploy]') == true
name: Deploy frontend (demo)
needs: [ push-frontend-image ]
needs: [ get-head-commit, push-frontend-image, deploy-dynamodb, deploy-cognito, deploy-api ]
runs-on: ubuntu-latest
outputs:
stack-name: ${{ steps.deploy.outputs.stack-name }}
Expand Down Expand Up @@ -98,6 +117,7 @@ jobs:
stack-name-prefix: preview-frontend
template: ${{ steps.build.outputs.template }}
s3-prefix: sse-preview
pull-repository: false
tags: |-
sse:component=frontend
sse:stack-type=preview
Expand All @@ -118,8 +138,9 @@ jobs:
echo "url=$url" >> "$GITHUB_OUTPUT"
deploy-dynamodb:
if: contains(github.event.head_commit.message, '[deploy]') == true
if: contains(needs.get-head-commit.outputs.commit-message, '[deploy]') == true
name: Deploy dynamodb (demo)
needs: get-head-commit
runs-on: ubuntu-latest
environment:
name: demo
Expand Down Expand Up @@ -160,6 +181,7 @@ jobs:
template: .aws-sam/build/template.yaml
cache-name: ${{ steps.build.outputs.cache-key }}
s3-prefix: sse-preview
pull-repository: false
tags: |-
sse:component=dynamodb
sse:stack-type=preview
Expand All @@ -170,8 +192,9 @@ jobs:
DeploymentName=${{ steps.get-deployment-name.outputs.pretty-branch-name }}
deploy-cognito:
if: contains(github.event.head_commit.message, '[deploy]') == true
if: contains(needs.get-head-commit.outputs.commit-message, '[deploy]') == true
name: Deploy cognito (demo)
needs: get-head-commit
runs-on: ubuntu-latest
environment:
name: demo
Expand Down Expand Up @@ -213,6 +236,7 @@ jobs:
template: .aws-sam/build/template.yaml
cache-name: ${{ steps.build.outputs.cache-key }}
s3-prefix: sse-preview
pull-repository: false
tags: |-
sse:component=cognito
sse:stack-type=preview
Expand All @@ -223,8 +247,9 @@ jobs:
DeploymentName=${{ steps.get-deployment-name.outputs.pretty-branch-name }}
deploy-api:
if: contains(github.event.head_commit.message, '[deploy]') == true
if: contains(needs.get-head-commit.outputs.commit-message, '[deploy]') == true
name: Deploy API (demo)
needs: get-head-commit
runs-on: ubuntu-latest
environment:
name: demo
Expand Down Expand Up @@ -267,6 +292,7 @@ jobs:
template: .aws-sam/build/template.yaml
cache-name: ${{ steps.build.outputs.cache-key }}
s3-prefix: sse-preview
pull-repository: false
tags: |-
sse:component=api
sse:stack-type=preview
Expand Down
2 changes: 1 addition & 1 deletion backend/api/api.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Conditions:
Globals:
Function:
Timeout: 10
Runtime: nodejs18.x
Runtime: nodejs20.x
PermissionsBoundary: !If [ UsePermissionsBoundary, !Ref PermissionsBoundary, !Ref AWS::NoValue ]
VpcConfig:
SecurityGroupIds: [ !ImportValue VPC-VPCEndpointsSecurityGroup ]
Expand Down
2 changes: 1 addition & 1 deletion backend/cognito/cognito.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Conditions:
Globals:
Function:
Timeout: 10
Runtime: nodejs18.x
Runtime: nodejs20.x
PermissionsBoundary: !If [ UsePermissionsBoundary, !Ref PermissionsBoundary, !Ref AWS::NoValue ]
VpcConfig:
SecurityGroupIds: [ !ImportValue VPC-VPCEndpointsSecurityGroup ]
Expand Down
Loading

0 comments on commit 6633f18

Please sign in to comment.