Skip to content

Commit a6fc384

Browse files
authored
Merge pull request #13 from MITLibraries/update-caller-workflows
Update To Use New Shared Workflows
2 parents 68b3e57 + 6581451 commit a6fc384

File tree

4 files changed

+43
-17
lines changed

4 files changed

+43
-17
lines changed

.github/workflows/dev-build.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### This is the Terraform-generated dev-build.yml workflow for the docker-matomo-dev app repository ###
2-
name: Dev Build and Deploy Fargate Container
2+
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document ###
3+
### If the container requires any additional pre-build commands, uncomment and edit ###
4+
### the PREBUILD line at the end of the document. ###
5+
name: Dev Container Build and Deploy
36
on:
47
workflow_dispatch:
58
pull_request:
@@ -10,10 +13,12 @@ on:
1013

1114
jobs:
1215
deploy:
13-
name: Dev Deploy Fargate Container
14-
uses: mitlibraries/.github/.github/workflows/fargate-shared-deploy-dev.yml@main
16+
name: Dev Container Deploy
17+
uses: mitlibraries/.github/.github/workflows/ecr-shared-deploy-dev.yml@main
1518
secrets: inherit
1619
with:
1720
AWS_REGION: "us-east-1"
1821
GHA_ROLE: "docker-matomo-gha-dev"
1922
ECR: "docker-matomo-dev"
23+
# FUNCTION: ""
24+
# PREBUILD:

.github/workflows/prod-promote.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
### This is the Terraform-generated prod-promote.yml workflow for the docker-matomo-prod app repository ###
2-
name: Prod Promote Fargate Container
1+
### This is the Terraform-generated prod-promote.yml workflow for the docker-matomo-prod repository. ###
2+
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document. ###
3+
name: Prod Container Promote
34
on:
45
workflow_dispatch:
56
release:
67
types: [published]
78

89
jobs:
910
deploy:
10-
name: Prod Promote Fargate Container
11-
uses: mitlibraries/.github/.github/workflows/fargate-shared-promote-prod.yml@main
11+
name: Prod Container Promote
12+
uses: mitlibraries/.github/.github/workflows/ecr-shared-promote-prod.yml@main
1213
secrets: inherit
1314
with:
1415
AWS_REGION: "us-east-1"
1516
GHA_ROLE_STAGE: docker-matomo-gha-stage
1617
GHA_ROLE_PROD: docker-matomo-gha-prod
1718
ECR_STAGE: "docker-matomo-stage"
1819
ECR_PROD: "docker-matomo-prod"
20+
# FUNCTION: ""
21+

.github/workflows/stage-build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
### This is the Terraform-generated stage-build.yml workflow for the docker-matomo-stage app repository ###
2-
name: Stage Build and Deploy Fargate Container
1+
### This is the Terraform-generated dev-build.yml workflow for the docker-matomo-stage app repository ###
2+
### If this is a Lambda repo, uncomment the FUNCTION line at the end of the document ###
3+
### If the container requires any additional pre-build commands, uncomment and edit ###
4+
### the PREBUILD line at the end of the document. ###
5+
name: Stage Container Build and Deploy
36
on:
47
workflow_dispatch:
58
push:
@@ -10,10 +13,12 @@ on:
1013

1114
jobs:
1215
deploy:
13-
name: Stage Deploy Fargate Container
14-
uses: mitlibraries/.github/.github/workflows/fargate-shared-deploy-stage.yml@main
16+
name: Stage Container Deploy
17+
uses: mitlibraries/.github/.github/workflows/ecr-shared-deploy-stage.yml@main
1518
secrets: inherit
1619
with:
1720
AWS_REGION: "us-east-1"
1821
GHA_ROLE: "docker-matomo-gha-stage"
1922
ECR: "docker-matomo-stage"
23+
# FUNCTION: ""
24+
# PREBUILD:

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
.PHONY: help dist-dev publish-dev dist-stage publish-stage
22
SHELL=/bin/bash
3-
### This is the Terraform-generated header for docker-matomo-dev ###
3+
### This is the Terraform-generated header for docker-matomo-dev. If ###
4+
### this is a Lambda repo, uncomment the FUNCTION line below ###
5+
### and review the other commented lines in the document. ###
46
ECR_NAME_DEV:=docker-matomo-dev
57
ECR_URL_DEV:=222053980223.dkr.ecr.us-east-1.amazonaws.com/docker-matomo-dev
6-
### End of Terraform-generated header ###
8+
# FUNCTION_DEV:=
9+
### End of Terraform-generated header ###
710

811
help: ## Print this message
912
@awk 'BEGIN { FS = ":.*##"; print "Usage: make <target>\n\nTargets:" } \
@@ -21,10 +24,16 @@ publish-dev: dist-dev ## Build, tag and push (intended for developer-based manua
2124
docker push $(ECR_URL_DEV):latest
2225
docker push $(ECR_URL_DEV):`git describe --always`
2326

24-
### Terraform-generated manual shortcuts for deploying to Stage ###
25-
### This requires that ECR_NAME_STAGE & ECR_URL_STAGE environment variables are set locally
26-
### by the developer and that the developer has authenticated to the correct AWS Account.
27-
### The values for the environment variables can be found in the stage_build.yml caller workflow.
27+
### If this is a Lambda repo, uncomment the two lines below ###
28+
# update-lambda-dev: ## Updates the lambda with whatever is the most recent image in the ecr (intended for developer-based manual update)
29+
# aws lambda update-function-code --function-name $(FUNCTION_DEV) --image-uri $(ECR_URL_DEV):latest
30+
31+
32+
### Terraform-generated manual shortcuts for deploying to Stage. This requires ###
33+
### that ECR_NAME_STAGE, ECR_URL_STAGE, and FUNCTION_STAGE environment ###
34+
### variables are set locally by the developer and that the developer has ###
35+
### authenticated to the correct AWS Account. The values for the environment ###
36+
### variables can be found in the stage_build.yml caller workflow. ###
2837
dist-stage: ## Only use in an emergency
2938
docker build --platform linux/amd64 \
3039
-t $(ECR_URL_STAGE):latest \
@@ -35,3 +44,7 @@ publish-stage: ## Only use in an emergency
3544
docker login -u AWS -p $$(aws ecr get-login-password --region us-east-1) $(ECR_URL_STAGE)
3645
docker push $(ECR_URL_STAGE):latest
3746
docker push $(ECR_URL_STAGE):`git describe --always`
47+
48+
### If this is a Lambda repo, uncomment the two lines below ###
49+
# update-lambda-stage: ## Updates the lambda with whatever is the most recent image in the ecr (intended for developer-based manual update)
50+
# aws lambda update-function-code --function-name $(FUNCTION_STAGE) --image-uri $(ECR_URL_STAGE):latest

0 commit comments

Comments
 (0)