Skip to content

Commit

Permalink
ATO-762: [deploy] Removing unecessary service.
Browse files Browse the repository at this point in the history
  • Loading branch information
kalpaitch committed Jul 23, 2024
1 parent b8c6ba5 commit 801d6f8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 85 deletions.
47 changes: 0 additions & 47 deletions .github/actions/build-backend-component/action.yml

This file was deleted.

38 changes: 22 additions & 16 deletions .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:

jobs:
build-frontend-dependencies:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Build frontend
runs-on: ubuntu-latest
outputs:
Expand All @@ -36,7 +36,7 @@ jobs:
artifact-name: frontend-build-demo

push-frontend-image:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Push frontend image
needs: build-frontend-dependencies
runs-on: ubuntu-latest
Expand All @@ -61,12 +61,12 @@ jobs:
aws-role-arn: ${{ vars.DEPLOYMENT_ROLE_ARN }}
repository: ${{ vars.FRONTEND_CONTAINER_REPOSITORY_NAME }}
image-tags: "${{ github.head_ref || github.ref_name }}"
dockerfile: Dockerfile
dockerfile: infrastructure/frontend/Dockerfile
artifact-name: frontend-build-demo
artifact-path: dist

build-frontend-infrastructure:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Build frontend infrastructure
needs: push-frontend-image
runs-on: ubuntu-latest
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
path: .aws-sam/build

deploy-frontend:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Deploy frontend
needs: [ build-frontend-infrastructure, deploy-api, deploy-cognito, deploy-dynamodb ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -156,8 +156,8 @@ jobs:
printf "🌐 Deployment URL\n%s" "$url" >> "$GITHUB_STEP_SUMMARY"
echo "url=$url" >> "$GITHUB_OUTPUT"
build-dynamo:
if: contains(github.event.head_commit.message, '[deploy]') == true
build-dynamodb:
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Build dynamodb
runs-on: ubuntu-latest
outputs:
Expand All @@ -168,17 +168,17 @@ jobs:
id: build
uses: govuk-one-login/github-actions/sam/build-application@6144f39407b01c9b25b39537b3956deca9e32620 # 22/02/2024
with:
template: backend/dynamodb/cognito.template.yml
template: backend/dynamodb/dynamodb.template.yml
base-dir: backend/dynamodb
source-dir: backend/dynamodb
cache-name: dynamodb-infra
artifact-name: dynamodb-infrastructure
pull-repository: true

deploy-dynamodb:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Deploy dynamodb
needs: build-dynamo
needs: build-dynamodb
runs-on: ubuntu-latest
outputs:
stack-name: ${{ steps.build.outputs.stack-name }}
Expand All @@ -202,6 +202,8 @@ jobs:
disable-rollback: false
stack-name-prefix: preview-dynamodb
artifact-name: ${{ needs.build-dynamodb.outputs.artifact-name }}
artifact-path: .aws-sam/build
template: .aws-sam/build/template.yaml
cache-name: ${{ needs.build-dynamodb.outputs.cache-key }}
s3-prefix: sse-preview
tags: |-
Expand All @@ -214,7 +216,7 @@ jobs:
DeploymentName=${{ steps.get-deployment-name.outputs.pretty-branch-name }}
build-cognito:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Build cognito
runs-on: ubuntu-latest
outputs:
Expand All @@ -234,7 +236,7 @@ jobs:
pull-repository: true

deploy-cognito:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Deploy cognito
needs: build-cognito
runs-on: ubuntu-latest
Expand All @@ -259,7 +261,9 @@ jobs:
delete-failed-stack: true
disable-rollback: false
stack-name-prefix: preview-cognito
artifact-name: backend-cognito-infrastructure
artifact-name: ${{ needs.build-cognito.outputs.artifact-name }}
artifact-path: .aws-sam/build
template: .aws-sam/build/template.yaml
cache-name: ${{ needs.build-cognito.outputs.cache-key }}
s3-prefix: sse-preview
tags: |-
Expand All @@ -272,7 +276,7 @@ jobs:
DeploymentName=${{ steps.get-deployment-name.outputs.pretty-branch-name }}
build-api:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Build api
runs-on: ubuntu-latest
outputs:
Expand All @@ -293,7 +297,7 @@ jobs:
pull-repository: true

deploy-api:
if: contains(github.event.head_commit.message, '[deploy]') == true
# if: contains(github.event.head_commit.message, '[deploy]') == true
name: Deploy api
needs: build-api
runs-on: ubuntu-latest
Expand All @@ -318,7 +322,9 @@ jobs:
delete-failed-stack: true
disable-rollback: false
stack-name-prefix: preview-api
artifact-name: backend-api-infrastructure
artifact-name: ${{ needs.build-api.outputs.artifact-name }}
artifact-path: .aws-sam/build
template: .aws-sam/build/template.yaml
cache-name: ${{ needs.build-api.outputs.cache-key }}
s3-prefix: sse-preview
tags: |-
Expand Down
44 changes: 22 additions & 22 deletions backend/api/api.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/get-user.getUserHandler
Handler: src/handlers/dynamodb/get-user.getUserHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -401,7 +401,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/put-user.putUserHandler
Handler: src/handlers/dynamodb/put-user.putUserHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -436,7 +436,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/update-user.updateUserHandler
Handler: src/handlers/dynamodb/update-user.updateUserHandler
Description: Updates user data in DynamoDB
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Expand Down Expand Up @@ -474,7 +474,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/get-services.getServicesHandler
Handler: src/handlers/dynamodb/get-services.getServicesHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -509,7 +509,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/get-session-count.getSessionCountHandler
Handler: src/handlers/dynamodb/get-session-count.getSessionCountHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -544,7 +544,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/global-sign-out.globalSignOutHandler
Handler: src/handlers/dynamodb/global-sign-out.globalSignOutHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -579,7 +579,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/put-service.putServiceHandler
Handler: src/handlers/dynamodb/put-service.putServiceHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -609,7 +609,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/get-service-clients.getServiceClientsHandler
Handler: src/handlers/dynamodb/get-service-clients.getServiceClientsHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -644,7 +644,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/put-service-client.putServiceClientHandler
Handler: src/handlers/dynamodb/put-service-client.putServiceClientHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -673,7 +673,7 @@ Resources:
# AWS SDK v3 dependencies are already included in the lambda runtime
- "@aws-sdk/*"
Properties:
Handler: backend/api/src/handlers/dynamodb/update-service.updateServiceHandler
Handler: src/handlers/dynamodb/update-service.updateServiceHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -704,7 +704,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/update-service-client.updateServiceClientHandler
Handler: src/handlers/dynamodb/update-service-client.updateServiceClientHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -734,7 +734,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/put-service-user.putServiceUserHandler
Handler: src/handlers/dynamodb/put-service-user.putServiceUserHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -765,7 +765,7 @@ Resources:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Description: Assumes a cross-account role and invokes the Auth register Lambda
Handler: backend/api/src/handlers/auth/register-client.registerClientHandler
Handler: src/handlers/auth/register-client.registerClientHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -794,7 +794,7 @@ Resources:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Description: Updates a client using an HTTP endpoint
Handler: backend/api/src/handlers/auth/update-client.updateClientInRegistryHandler
Handler: src/handlers/auth/update-client.updateClientInRegistryHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -824,7 +824,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/step-functions/new-service.newServiceHandler
Handler: src/handlers/step-functions/new-service.newServiceHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -860,7 +860,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/step-functions/new-client.newClientHandler
Handler: src/handlers/step-functions/new-client.newClientHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -896,7 +896,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/step-functions/update-client.doUpdateClientHandler
Handler: src/handlers/step-functions/update-client.doUpdateClientHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -931,7 +931,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/step-functions/update-service.doUpdateServiceHandler
Handler: src/handlers/step-functions/update-service.doUpdateServiceHandler
Description: Updates service data in DynamoDB and Client Registry
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Expand Down Expand Up @@ -1008,7 +1008,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/logging/sqs-service.sendSQSMessageToTxMAHandler
Handler: src/handlers/logging/sqs-service.sendSQSMessageToTxMAHandler
Description: Sends a message to the TxMA SQS
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Policies:
Expand Down Expand Up @@ -1230,7 +1230,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/dynamo-db-service.getDynamoDBEntriesHandler
Handler: src/handlers/dynamodb/dynamo-db-service.getDynamoDBEntriesHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -1265,7 +1265,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/dynamo-db-service.deleteDynamoDBClientEntriesHandler
Handler: src/handlers/dynamodb/dynamo-db-service.deleteDynamoDBClientEntriesHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down Expand Up @@ -1300,7 +1300,7 @@ Resources:
External:
- "@aws-sdk/*" # AWS SDK v3 dependencies are already included in the lambda runtime
Properties:
Handler: backend/api/src/handlers/dynamodb/dynamo-db-service.deleteDynamoDBServiceEntriesHandler
Handler: src/handlers/dynamodb/dynamo-db-service.deleteDynamoDBServiceEntriesHandler
CodeSigningConfigArn: !If [ UseCodeSigning, !Ref CodeSigningConfigArn, !Ref AWS::NoValue ]
Tracing: Active
Policies:
Expand Down

0 comments on commit 801d6f8

Please sign in to comment.