-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor: implement tag-based deployment #2213
Conversation
1577ac1
to
69c3691
Compare
c29fe08
to
d48ebce
Compare
Now Unfortunately I couldn't set With this implementation we'll have the following behavior in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good so far! I think the workflow updates all look correct.
But we still need the updates to the Azure DevOps/Terraform pipeline, which is looking at the old test
and prod
branches etc.
Take a look at Server for how those pipelines work with tag-based.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, don't forget that tag-based deployment means we get the version number from the tag instead of hardcoding it in the source.
That means changes at least to pyproject.toml
and probably the Docker build process.
See these PRs for how it was done elsewhere:
ead861e
to
80ebb05
Compare
80ebb05
to
2914299
Compare
Thanks @thekaveman, trying it now! |
Thanks for the review, I had overlooked the Azure DevOps/Terraform pipeline and the dynamic versioning part. I think we should now have all the parts ready for tag-based deployment. The only thing I don't feel very confident about is if we need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting really close @lalver1, this is looking great.
Just a few more small notes and I think it's ready.
I was wondering the same thing. I see we do it this way in Server, so there must have been a reason. No worries, it is copied over immediately once we launch the devcontainer, so I think you can just leave it as-is. |
2914299
to
f4304d0
Compare
python terraform/pipeline/workspace.py | ||
|
||
TAG_TYPE=$(python terraform/pipeline/tag.py) | ||
echo "##vso[task.setvariable variable=tag_type;isOutput=true]$TAG_TYPE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines could be normalized to move the TAG_TYPE
and echo
in tag.py
similar to how it works in workspace.py
, but not a priority for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Great, I'll create an issue to come back to this later.
Thanks @angela-tran, that's a good point about the tests! I'm thinking about reusing these workflows:
I don't think we need to run Oh and one more question, I'm thinking about setting |
That list looks good to me. And we'll want
Yep, that's definitely needed. |
0a3b639
to
1644262
Compare
@angela-tran @thekaveman I added the tests to the I did notice that
and I'm wondering if I should add
covers this case? |
Great catch @lalver1 -- yes, I think we should add I took a closer look at that second part from Long story short 😄, we don't need the second part here, and it could also be removed in |
Moved the `initialize hook environments` and `manage commit-msg hooks` commands to postAttach.sh similar to the approach used in other cal-itp repos.
1644262
to
8910c31
Compare
Thanks @angela-tran! I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready to go 🎉
This PR implements the second step of code changes needed to transition the benefits repository to tag-based deployments as described in #1527.
The code changes are associated with:
git
metadataThe last step needed to close #1527, will be to remove thetest
andprod
branches and remove references to them in all the GitHub workflows.Acceptance Criteria
main
deploys to thedev
environmenttest
environmentprod
environment and triggers the release jobenvironment
,dev
andprod
Azure jobs (terraform
stage) run correctlygit
metadata