Skip to content

Commit

Permalink
Create Stage and Prod Automation Workflows
Browse files Browse the repository at this point in the history
Why these changes are being introduced:
With the changes from mitlib-tf-workloads-ecr pushed to Dev1,
Stage-Workloads, and Prod-Workloads, we can finish the GitHub Actions
workflows for this repository.

How this addresses that need:
* Create the stage_build workflow for automated build/push of the
container to ECR (triggered by commits to the `main` branch)
* Create the prod_promote workflow for automated download from stage
and upload to prod ECR (triggered by tagged release on the `main`
branch)

Side effects of this change:
None. Other than the fact that every commit to the `main` branch will
now automatically update the container image in the Stage-Workloads
ECR repository

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/ENSY-177
  • Loading branch information
cabutlermit committed Sep 29, 2023
1 parent 01ee673 commit 7460549
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/prod_promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### This is the Terraform-generated prod-promote.yml workflow for the alma-bursartransfer-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: alma-bursartransfer-gha-stage
GHA_ROLE_PROD: alma-bursartransfer-gha-prod
ECR_STAGE: "alma-bursartransfer-stage"
ECR_PROD: "alma-bursartransfer-prod"
FUNCTION: "alma-bursartransfer-prod"
24 changes: 24 additions & 0 deletions .github/workflows/stage_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### This is the Terraform-generated dev-build.yml workflow for the alma-bursartransfer-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: "alma-bursartransfer-gha-stage"
ECR: "alma-bursartransfer-stage"
FUNCTION: "alma-bursartransfer-stage"
# PREBUILD:

0 comments on commit 7460549

Please sign in to comment.