-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add additionalMounts for GitHub Action Output Mount #219
Add additionalMounts for GitHub Action Output Mount #219
Conversation
…or GitHub Action output (azdo-task/scripts/build-package.sh#L49->L64
I am unsure how to go about testing this, some direction here would be wonderful. Thank you! |
In terms of testing, this is a good nudge to add something to the docs - thank you! I just ran a test and discovered that there are a couple of things that have snuck through that prevent running tests in a fork and have created #220. Once that is merged, you can go to the Actions tab for your fork and you will see the various workflows listed: Click on This will pop up some options. Select your PR branch, enter a number in the PR number box, and untick the This should do a run for most of the GitHub action tests. The Azure DevOps tests require an environment to be set up and configured which can be triggered by maintainers against a PR. |
@stuartleeks should I add back those deleted lines? I am not sure if it was my ide, or if a merge happened within the time I had synced and pushed. |
@stephenandary - yes, those lines are needed |
@stuartleeks in my tests I am getting hit by some permission, env token, and 429 errors, can't get past the first block. May require you to approve the test workflow to have tests run with correct secrets. Also, does a test need to be made for mounts? I did not do that. |
@stephenandary - #220 has been merged now, so if you merge that into your PR branch you should be able to use the steps above to run the subset of GH tests that don't need credentials on your fork (i.e. without needing someone else to trigger a test run) In terms of tests, yes I think it would be good to add a test showing that GITHUB_OUTPUT is working from a |
…or GitHub Action output (azdo-task/scripts/build-package.sh#L49->L64
@stuartleeks do you recall what the mount path should be from #187 (comment)? |
…erUp ... again lol
…or GitHub Action output (azdo-task/scripts/build-package.sh#L49->L64
@stuartleeks, just bubbling this up again, as it will save me time having to figure this out if you know. Unless this is not a need to know for runCmd test. I also merged main, I was 1 commit behind which explains those little changes that were required. |
There was some discussion around the |
Yes, that is perfect! I forgot about that one! Mount is |
@stuartleeks based on the approach you highlighted in #188, I am unsure what tests are appropriate to modify. I have added mounts in |
The tests in |
Thanks @stuartleeks! I think where I am getting confused a bit is to whether a user will need to add the GITHUB_OUTPUT mount in the devcontainer.json to use env variable, or if there is a way that does not require user input. I am going to go down the road of adding the mount this morning, and hopefully, this becomes more clear during that exercise. |
@stuartleeks ,
Currently, in integration tests, I am thinking of adding a mount along the lines of: "mounts": [
// Keep command history
"source=build-args-bashhistory,target=/home/vscode/commandhistory",
// Mount to utilize GITHUB_OUTPUTS
"source=/home/runner/work/${REPO}/${REPO}/.github/${GITHUB_ACTION}/${STEP_NAME}/output, target=/mnt/github/output"
], I am not sure if this is the correct approach so trying to document in PR as I go. I imagine I would need to update the DOCKERFILE to reflect the GITHUB_OUTPUT env variable. I am hoping you know how I can do this without the env.variables as I don't think they will work here. Will a user also need to do both of these things? Does this make sense to you? |
I imagined that the action code would determine the values for It has occurred to me that anyone using this action and setting outputs/environment variables etc will be using the same approach that the action uses (which is now deprecated). We should make sure we get this change in soon to allow people chance to migrate to the new approach prior to the current approach being disabled. We're also seeing an quite a lot of failures in CI builds that seem to stem from the existing |
@stuartleeks, to make sure I understand, I should not worry about runArgs and buildArgs tests, and just update the
|
…ing or string array
…o prevent error TS2322: Type 'string' is not assignable to type 'string[]'
…t on wrong branch
…in build-package.sh
…ple say it fixes ambiguous redirect, they have no idea why
Fix node12 and set-output warnings
Update more actions for Nodejs12 and set-state warnings
As discussed in one of the earlier comments, I pushed a couple of commits to add the mounts/env vars for I also pushed the changes from #221 here, so I've closed that PR in favour of this one. I pushed this to the Thanks for all your work on this @stephenandary ! |
@stuartleeks this is so wonderful! Thank you for helping me learn. It would have taken me a while to figure out those additional changes and I'm grateful you could take this over the finish line. It was an enjoyable experience to work on, and thats all you! P.S. this was my first Open Source PR ever haha, going to save this one as a memento! |
@stephenandary - you are welcome. Thanks again for your work on this, and here's to many more OSS PRs 😁 |
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.
LGTM!
@stuartleeks
Beginning PR to add additional mounts required for GitHub Output in CI.
Recreating #187 work with a non-stale base.
WIP(DevContainerCliUpArgs - initial commit to add additional mounts for GitHub Action output (azdo-task/scripts/build-package.sh#L49->L64
There are a few deletions I did not make:
@stuartleeks update:
Fixes #180, #188, #195