Skip to content

Conversation

carlpartridge
Copy link
Collaborator

🎫 Ticket

https://jira.cms.gov/browse/BCDA-9263

🛠 Changes

Add workflows to build, publish, and deploy all services via ECS/fargate.

ℹ️ Context

Part of our move to fargate.

🧪 Validation

Workflow testing

@laurenkrugen-navapbc
Copy link
Contributor

Nit: can we rename the PR to the standard format BCDA-XXXX:

?

@carlpartridge carlpartridge changed the title Carl 9263 fargate workflows BCDA-9263: Fargate workflows Oct 16, 2025
Copy link
Contributor

@michaeljvaldes michaeljvaldes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this plan for the workflows makes a lot of sense, and I'm curious about how testing is going.

repository: CMSgov/bcda-app
ref: ${{ inputs.release_version }}
- name: Set ECR_URL
run: echo "ECR_URL=${{ secrets[matrix.vars.account_id] }}.dkr.ecr.us-east-1.amazonaws.com/bcda-api" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which ECR do we push to? Should we push to both prod and non-prod ECRs every time we create a new tag?

Copy link
Collaborator Author

@carlpartridge carlpartridge Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we are pushing to both prod and non-prod for each deploy. We will eventually need these in both places. We only publish once per release tag so I dont think thats a big deal. I need to adjust this a bit for dev as we do deploy that daily and its probably not ideal to have a 'main' nor a 'latest' tag that doesnt align with the latest release tag in prod.

Edit: Updated to account for dev autodeploy.

$(eval CURRENT_COMMIT=$(shell git log -n 1 --pretty=format:'%h'))
$(eval DOCKER_REGISTRY_URL=${ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/bcda-worker)
docker build -t ${DOCKER_REGISTRY_URL}:latest -t '${DOCKER_REGISTRY_URL}:${CURRENT_COMMIT}' -f Dockerfiles/Dockerfile.bcdaworker_prod .
docker build -t ${DOCKER_REGISTRY_URL}:latest -t '${DOCKER_REGISTRY_URL}:${RELEASE_VERSION}' -f Dockerfiles/Dockerfile.bcdaworker .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the publish make commands if we don't use them in our github workflow?

Copy link
Collaborator Author

@carlpartridge carlpartridge Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These came first so I updated them. I think they could be useful as a manual process outside of gh workflows. Could also argue that either we should use these make commands in the gh workflow itself or that we should get rid of these make commands.

@carlpartridge carlpartridge marked this pull request as ready for review October 17, 2025 14:39
@carlpartridge carlpartridge requested a review from a team as a code owner October 17, 2025 14:39
SSAS_RELEASE_VERSION: ${{ inputs.ssas_release_version || 'main' }}
RELEASE_ENV: ${{ inputs.env || 'dev' }}
CONFIRM_RELEASE_ENV: ${{ inputs.confirm_env || 'dev' }}
VERIFICATION_RETRIES: 90 # 90 retries with 10s sleep = max 900s or 15m. Verification jobs run in parallel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we essentially giving ourselves 15 minutes to determine for the service to come up? Can this timeframe be reduced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants