Verify release train workflow files exist before creating a release branch - #18
Merged
Merged
Conversation
…ranch. Fixes #17 Signed-off-by: Ryan Baxter <ryan.baxter@broadcom.com>
All three branch-creation workflows checked for the same two files with their own copy of the loop. Extract check-release-train-workflows so the list has one definition; callers choose between generating the missing files and failing fast via fail-on-missing. Signed-off-by: Ryan Baxter <ryan.baxter@broadcom.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17
create-commercial-release-branch.ymldispatchesrelease-train-join.ymlon the new release branch as its last step, but never checked that the release train workflows were there. Because the release branch inherits its workflows from the source branch, a source branch that has not been through the workflow generator fails at that final dispatch — after the milestone, the release branch, the rewritten CI/PR workflows, and theconfig/projects.jsonentry have all already been created and have to be undone by hand.The check
A new
Verify release train workflows exist on source branchstep runs immediately after the tag/release existence check and before the milestone is created. It checksspring-cloud/<project>at the source branch, and on a miss fails with a message naming each missing file, the branch it was expected on, and the generator workflow to run. Verifying up front means a failure leaves nothing to clean up.Shared action
The file list now has one definition.
create-oss-release-branch.ymlandcreate-hotfix-release-branch.ymleach carried their own copy of the same loop overrelease-train-join.ymlandrelease-train-ready.yml; all three now call.github/actions/check-release-train-workflows, which reportsany-missingandmissingand takes afail-on-missinginput.Behaviour of the two existing callers is unchanged — they still generate the missing files rather than failing. The refactor does mean:
ensure-workflowsjobs now check out this repo unconditionally, since the composite action is local; the checkout used to be gated onneeds-generationany-missing == 'true'— it is only ever consumed by the generatorAs #17 notes, whether the commercial path should also generate the missing files is a separate decision; this is the minimum.