Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### This is the Terraform-generated dev-build.yml workflow for the ppod-dev app repository ###
name: dev Build and Deploy lambda Container
on:
workflow_dispatch:
pull_request:
branches:
- main
paths-ignore:
- '.github/**'

jobs:
deploy:
name: dev Deploy lambda Container
uses: mitlibraries/.github/.github/workflows/lambda-shared-deploy-dev.yml@container-flows
secrets: inherit
with:
AWS_REGION: "us-east-1"
GHA_ROLE: "ppod-gha-dev"
ECR: "ppod-dev"
FUNCTION: "ppod-dev"
38 changes: 0 additions & 38 deletions .github/workflows/dev_ecr_push.yml

This file was deleted.

30 changes: 17 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
SHELL=/bin/bash
DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ)
ECR_REGISTRY_DEV=$(shell aws sts get-caller-identity --query Account --output text).dkr.ecr.us-east-1.amazonaws.com
### This is the Terraform-generated header for ppod-dev
ECR_NAME_DEV:=ppod-dev
ECR_URL_DEV:=222053980223.dkr.ecr.us-east-1.amazonaws.com/ppod-dev
FUNCTION_DEV:=ppod-dev
### End of Terraform-generated header ###

help: ## Print this message
@awk 'BEGIN { FS = ":.*##"; print "Usage: make <target>\n\nTargets:" } \
Expand Down Expand Up @@ -41,19 +45,19 @@ isort:
mypy:
pipenv run mypy .

### Container commands ###
dist-dev: ## Build docker container
### Developer Deploy Commands ###
dist-dev: ## Build docker container (intended for developer-based manual build)
docker build --platform linux/amd64 \
-t $(ECR_REGISTRY_DEV)/ppod-dev:latest \
-t $(ECR_REGISTRY_DEV)/ppod-dev:`git describe --always` \
-t ppod-dev:latest .
-t $(ECR_URL_DEV):latest \
-t $(ECR_URL_DEV):`git describe --always` \
-t $(ECR_NAME_DEV):latest .

publish-dev: dist-dev ## Build, tag and push
docker login -u AWS -p $$(aws ecr get-login-password --region us-east-1) $(ECR_REGISTRY_DEV)
docker push $(ECR_REGISTRY_DEV)/ppod-dev:latest
docker push $(ECR_REGISTRY_DEV)/ppod-dev:`git describe --always`
publish-dev: dist-dev ## Build, tag and push (intended for developer-based manual publish)
docker login -u AWS -p $$(aws ecr get-login-password --region us-east-1) $(ECR_URL_DEV)
docker push $(ECR_URL_DEV):latest
docker push $(ECR_URL_DEV):`git describe --always`

update-lambda-dev: ## Updates the lambda with whatever is the most recent image in the ecr
update-lambda-dev: ## Updates the lambda with whatever is the most recent image in the ecr (intended for developer-based manual update)
aws lambda update-function-code \
--function-name ppod-dev \
--image-uri $(shell aws sts get-caller-identity --query Account --output text).dkr.ecr.us-east-1.amazonaws.com/ppod-dev:latest
--function-name $(FUNCTION_DEV) \
--image-uri $(ECR_URL_DEV):latest