Merge ci-github-hosted.yml into ci.yml using new, optional inputs.run-self-hosted#261
Merged
Merge ci-github-hosted.yml into ci.yml using new, optional inputs.run-self-hosted#261
ci-github-hosted.yml into ci.yml using new, optional inputs.run-self-hosted#261Conversation
…s.run-self-hosted`
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.
Closes #220
Background
Currently,
build-ciuses two workflow files,ci.ymlandci-github-hosted.ymlfor self- and GitHub-hosted runners respectively.This is due to small, previously irreconcilable differences in the
jobs.*.containerssection - specifically regarding thevolumessection. The GitHub-hosted variant didn't need any volumes to function, but the self-hosted one did.After chatting with GitHub Support, it was noted that it is indeed possible to reconcile these differences, by using a
inputs.run-self-hostedinput that turns the volume list into the expected list of volume defs iftrue, and empty lists iffalse.The PR
inputs.run-self-hostedthat defaults totruejobs.*.runs-onis determined byinputs.run-self-hosted- either the self-hosted group or the defaultubuntu-latestjobs.*.container.imageis also determined by the new input - picking either the runner or upstream imagejobs.*.container.volumesis the same - either the two required volumes for self-hosted, or dummy volumes for GitHub-hostedTesting
Tested in ACCESS-NRI/access-test-component#15. Note that the failures are due to concretization issues with the manifest - it is the initialisation of the containers that is the important part.
Specifically:
Other Implementations
In f2c8bd2, I used
fromJson('[]')as the GitHub-hosted case, but that was a bit flaky, as it was doing:Which meant under the hood
docker --volumewas silently ignoring the invalid volume definition (usually of the formHOST_PATH:CONTAINER_PATH:FLAGS). This works okay, but is flaky - docker or GitHub may throw errors for that in future.