Skip to content

Commit

Permalink
Automation for AWS Organization
Browse files Browse the repository at this point in the history
Why these changes are being introduced:
We need to deploy/publish automation and the Makefile additions as we
move this application into our AWS Organization.

How this addresses that need:
* Add the three GitHub Actions workflows for dev/stage/prod to
automate publishing the container on PR/Merge/Release
* Remove the stage_ecr_push.yml GitHub Action workflow that is
no longer needed

Side effects of this change:
After this is merged to main, the only way to manage the production
application running in Legacy AWS is to use the "legacy" branch.

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/IN-573
  • Loading branch information
cabutlermit committed Aug 2, 2023
1 parent 468b4da commit 168f28c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 20 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### This is the Terraform-generated dev-build.yml workflow for the ###
### dspace-submission-service-dev app repository ###
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document ###
### If the container requires any additional pre-build commands, uncomment and edit ###
### the PREBUILD line at the end of the document. ###
name: Dev Container Build and Deploy
on:
workflow_dispatch:
pull_request:
branches:
- main
paths-ignore:
- '.github/**'

jobs:
deploy:
name: Dev Container Deploy
uses: mitlibraries/.github/.github/workflows/ecr-shared-deploy-dev.yml@main
secrets: inherit
with:
AWS_REGION: "us-east-1"
GHA_ROLE: "dspace-submission-service-gha-dev"
ECR: "dspace-submission-service-dev"
# FUNCTION: ""
# PREBUILD:
22 changes: 22 additions & 0 deletions .github/workflows/prod-promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### This is the Terraform-generated prod-promote.yml workflow for the ###
### dspace-submission-service-prod repository. ###
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document. ###
name: Prod Container Promote
on:
workflow_dispatch:
release:
types: [published]

jobs:
deploy:
name: Prod Container Promote
uses: mitlibraries/.github/.github/workflows/ecr-shared-promote-prod.yml@main
secrets: inherit
with:
AWS_REGION: "us-east-1"
GHA_ROLE_STAGE: dspace-submission-service-gha-stage
GHA_ROLE_PROD: dspace-submission-service-gha-prod
ECR_STAGE: "dspace-submission-service-stage"
ECR_PROD: "dspace-submission-service-prod"
# FUNCTION: ""

25 changes: 25 additions & 0 deletions .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### This is the Terraform-generated stage-build.yml workflow for the ###
### dspace-submission-service-stage app repository ###
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document ###
### If the container requires any additional pre-build commands, uncomment and edit ###
### the PREBUILD line at the end of the document. ###
name: Stage Container Build and Deploy
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '.github/**'

jobs:
deploy:
name: Stage Container Deploy
uses: mitlibraries/.github/.github/workflows/ecr-shared-deploy-stage.yml@main
secrets: inherit
with:
AWS_REGION: "us-east-1"
GHA_ROLE: "dspace-submission-service-gha-stage"
ECR: "dspace-submission-service-stage"
# FUNCTION: ""
# PREBUILD:
20 changes: 0 additions & 20 deletions .github/workflows/stage_ecr_push.yml

This file was deleted.

0 comments on commit 168f28c

Please sign in to comment.