-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement tag-based deployment model #282
Comments
@angela-tran will start scoping this out for Eligibility Server. Feel free to edit the original issue description with any details/lists/etc. |
I've written up a WIP plan in the issue description for how we could implement the idea. Still thinking through all this |
This is great so far. Couple of quick thoughts:
The app service web hooks are watching for specific tags dev, test, and prod right? Or maybe this is Benefits / the old way we did it there that I'm thinking of.
Mentioned this in cal-itp/benefits#1527 too but let's look at tag protections.
I have a possible solution for this, I've been exploring in another project https://setuptools-git-versioning.readthedocs.io/en/stable/install.html#pyproject-toml |
Oh, yep that's right. The app service is looking for a |
Adding some clarification from our discussion earlier today:
The plan in the issue description was updated to reflect this. |
@thekaveman Do you think the checkboxes in the issue description are ready to be turned into issues to be worked on? I added in your thoughts about looking into tag protections and about using setuptools-git-versioning, but I'm not sure if it's ok that the research on those would be done as a part of the issues to be created. |
Corollary to cal-itp/benefits#1527
We may want to try this out here in Server first, where it is less likely to cause a disruption to the dev flow etc.
WIP - Rough sketch of how we could implement this:
What we want:
Have 1 branch called
main
.Deployments to dev environment
main
triggers Azure DevOps pipeline to runterraform plan
main
triggers Azure DevOps pipeline to runterraform apply
main
triggers GH Action to push tagged Docker image to GHCRDeployments to test and prod environments
-rcX
postfix triggers Azure DevOps to run fortest
-terraform plan
runs first, manual approval is needed, and thenterraform apply
runs-rcX
postfix triggers Azure DevOps to run forprod
-terraform plan
runs first, manual approval is needed, and thenterraform apply
runs. This also creates a GitHub release for the tag.Changes needed:
Most of the changes we need are for test/prod deployment.
Needs further research:
How the app gets its versionsetuptools_scm
A question that popped up while writing all this: based on the current pipeline YAML, do we runFigured out that this is not a bug -- see Investigating infra pipeline logic #285terraform apply
for thetest
workspace when a PR is opened against thetest
branch? That doesn't seem right - I would've said it should run aterraform plan
. (This doesn't affect new deployment model, but might be a benign bug in the current deployment model?)The text was updated successfully, but these errors were encountered: