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
24 changes: 24 additions & 0 deletions .github/workflows/dev-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 marimo-launcher-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: "marimo-launcher-gha-dev"
ECR: "marimo-launcher-dev"
# FUNCTION: ""
# PREBUILD:
21 changes: 21 additions & 0 deletions .github/workflows/prod-promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### This is the Terraform-generated prod-promote.yml workflow for the marimo-launcher-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: marimo-launcher-gha-stage
GHA_ROLE_PROD: marimo-launcher-gha-prod
ECR_STAGE: "marimo-launcher-stage"
ECR_PROD: "marimo-launcher-prod"
# FUNCTION: ""

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 marimo-launcher-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: "marimo-launcher-gha-stage"
ECR: "marimo-launcher-stage"
# FUNCTION: ""
# PREBUILD:
37 changes: 35 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
SHELL=/bin/bash
DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ)
### This is the Terraform-generated header for marimo-launcher-dev. ###
ECR_NAME_DEV:=marimo-launcher-dev
ECR_URL_DEV:=222053980223.dkr.ecr.us-east-1.amazonaws.com/marimo-launcher-dev
### End of Terraform-generated header ###

help: # Preview Makefile commands
@awk 'BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \
/^[-_[:alpha:]]+:.?*#/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)

# ensure OS binaries aren't called if naming conflict with Make recipes
.PHONY: help venv install update test coveralls lint black mypy ruff safety lint-apply black-apply ruff-apply
.PHONY: help dist-dev publish-dev dist-stage publish-stage venv install update test coveralls lint black mypy ruff safety lint-apply black-apply ruff-apply

##############################################
# Python Environment and Dependency commands
Expand Down Expand Up @@ -73,4 +77,33 @@ build: # Build local image for testing
docker build -t marimo-launcher:latest .

shell: # Shell into local container for testing
docker run -it --entrypoint='bash' marimo-launcher:latest
docker run -it --entrypoint='bash' marimo-launcher:latest


### Terraform-generated Developer Deploy Commands for Dev environment ###
dist-dev: ## Build docker container (intended for developer-based manual build)
docker build --platform linux/amd64 \
-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 (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`

### Terraform-generated manual shortcuts for deploying to Stage. This requires ###
### that ECR_NAME_STAGE, ECR_URL_STAGE, and FUNCTION_STAGE environment ###
### variables are set locally by the developer and that the developer has ###
### authenticated to the correct AWS Account. The values for the environment ###
### variables can be found in the stage_build.yml caller workflow. ###
dist-stage: ## Only use in an emergency
docker build --platform linux/amd64 \
-t $(ECR_URL_STAGE):latest \
-t $(ECR_URL_STAGE):`git describe --always` \
-t $(ECR_NAME_STAGE):latest .

publish-stage: ## Only use in an emergency
docker login -u AWS -p $$(aws ecr get-login-password --region us-east-1) $(ECR_URL_STAGE)
docker push $(ECR_URL_STAGE):latest
docker push $(ECR_URL_STAGE):`git describe --always`