Skip to content

Support Deployment Target Choice For Deployment Repositories#211

Merged
CodeGat merged 8 commits intodev-121-multi-target-workflowsfrom
209-support-deployment-target-choice
Jan 23, 2025
Merged

Support Deployment Target Choice For Deployment Repositories#211
CodeGat merged 8 commits intodev-121-multi-target-workflowsfrom
209-support-deployment-target-choice

Conversation

@CodeGat
Copy link
Copy Markdown
Member

@CodeGat CodeGat commented Jan 21, 2025

References #209

Important

This updated changes the model-deployment repositories ci.ymls pr-closed job to accepting a root-sbd argument rather than a model one. This is a major update, which will be incorporated into the overall dev-121-multi-target-workflows.

Background

Instead of the deployment targets coming from build-cd and being unchangeable from the model deployment repositories perspective, allow choice based on model deployment repository by picking deployment targets, set as repo-level vars. Specifically, this PR adds vars.RELEASE_DEPLOYMENT_TARGETS and vars.PRERELEASE_DEPLOYMENT_TARGETS to all model deployment repositories. These MUST be set for any repositories implementing the future v4 of the infrastructure that this PR is a part of.

In this PR:

  • Updated target matrix generation to take into account model deployment repository preferences for deployment targets, set as a space-separated list in the above vars - turned this into a custom action (get-target-matrix)
  • In order for the action to be usable by ci-closed.yml, I needed to rework some of the logic. This led to a big simplification in that pipeline.

Testing

The jq steps were tested locally on different $valid_targets, and $repo_release_targets - especially the intersection in $targets.

@CodeGat CodeGat added type:enhancement Improvements to existing features priority:medium version:MAJOR Requires an update to Model Deployment Repositories CI labels Jan 21, 2025
@CodeGat CodeGat self-assigned this Jan 21, 2025
@CodeGat CodeGat force-pushed the 209-support-deployment-target-choice branch from 1125f49 to 2f52e43 Compare January 22, 2025 03:08
jo-basevi
jo-basevi previously approved these changes Jan 22, 2025
Copy link
Copy Markdown
Contributor

@jo-basevi jo-basevi left a comment

Choose a reason for hiding this comment

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

Looks great!

Feel free to ignore this but as the logic is similar in both files, it almost could be worth a reusable action with an input to pass ${{ vars.PRERELEASE_DEPLOYMENT_TARGETS }} or ${{ vars.RELEASE_DEPLOYMENT_TARGETS }}

@CodeGat
Copy link
Copy Markdown
Member Author

CodeGat commented Jan 22, 2025

Thats a good idea. Made even good-er-er by the fact that I forgot to do similar logic in ci-closed.yml! I'll do that update now.

@CodeGat CodeGat dismissed jo-basevi’s stale review January 22, 2025 05:45

Dismissing so I don't accidentally merge - convert into action and add similar logic to ci-closed.yml

@CodeGat
Copy link
Copy Markdown
Member Author

CodeGat commented Jan 23, 2025

Thanks for your feedback @jo-basevi - I've created the action in 895fdd0 and added it to ci.yml and cd.yml in cd03bf1.

As I'd noted before, I forgot to do ci-closed.yml in a similar way. I'd updated that workflow, and then realised that we don't actually need to break it up into ci-closed.yml -> undeploy-1-setup.yml -> undeploy-2-start.yml - the middle workflow can be incorporated into the first. So I'd done a bit of rejigging of that workflow in 4d8a7c8

@CodeGat CodeGat requested a review from jo-basevi January 23, 2025 00:17
Comment thread .github/actions/get-target-matrix/action.yml Outdated
@CodeGat
Copy link
Copy Markdown
Member Author

CodeGat commented Jan 23, 2025

Copy link
Copy Markdown
Contributor

@jo-basevi jo-basevi left a comment

Choose a reason for hiding this comment

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

Looks good - Nice change on merging undeploy into one workflow

Comment thread .github/workflows/cd.yml
@CodeGat CodeGat merged commit c94ffe1 into dev-121-multi-target-workflows Jan 23, 2025
@CodeGat CodeGat deleted the 209-support-deployment-target-choice branch January 23, 2025 03:49
@CodeGat CodeGat mentioned this pull request Jan 23, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium type:enhancement Improvements to existing features version:MAJOR Requires an update to Model Deployment Repositories CI

Projects

Status: Done ✅

Development

Successfully merging this pull request may close these issues.

2 participants