nodejs-docs-samples
nodejs-docs-samples copied to clipboard
testing: add workflow for functions/v2/imagemagick sample
Description
Fixes #3149
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
- [ ] I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
- [ ] Tests pass:
npm test(see Testing) - [ ] Lint pass:
npm run lint(see Style) - [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
- [ ] This pull request is from a branch created directly off of
GoogleCloudPlatform/nodejs-docs-samples. Not a fork. - [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
- [ ] This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
- [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
- [ ] Please merge this PR for me once it is approved
In order for this to pass, we need two environment variables in the test runtime:
FUNCTIONS_BUCKETwhere the image to be scanned is loadedBLURRED_BUCKET_NAMEwhere the modified image is loaded by the function execution
In Kokoro configuration, this looks like the following:
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/c6e0a09b1700fd88c6a6dd53c11d39caf9a64f75/.kokoro/build.sh#L49
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/c6e0a09b1700fd88c6a6dd53c11d39caf9a64f75/.kokoro/build.sh#L70
However, I don't see an example of where the GOOGLE_CLOUD_PROJECT variable can be sourced in the GHA implementation of test runner.
@pattishin could you provide guidance?
Reassigning to @pattishin to clarify this is blocked on my end until we have preferred direction on configuring the system test behaviors.
@grayside this feels like an area where we need to define the practice; we don't have a recommended practice and we should think through how we should do this (not just for this service) but this will then allow us to provide the guidance for other sample contributors.
Marking this stale and closing for now. Please reopen when this is ready for review.