-
Notifications
You must be signed in to change notification settings - Fork 2
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
Switch to writing credentials from secrets for integration tests (WOR-1745). #312
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2024e08
Switch to writing credentials from secrets (WOR-1745).
cahrens c2ad9b4
Fix issue.
cahrens f1e439b
Fix issue.
cahrens e803543
Try just janitor.
cahrens 5da0240
Try just janitor.
cahrens 192b4f0
fix
cahrens 61586ac
Try giving full path
cahrens f631918
More debugging
cahrens a7700f4
More debugging
cahrens 4d063b8
More debugging
cahrens 99633a6
More debugging
cahrens 13d6753
More debugging
cahrens 189f497
More debugging
cahrens 6f90b7a
More debugging
cahrens d21ed9a
More debugging
cahrens c5e878a
Cleanup
cahrens 6734656
Cleanup
cahrens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 'write-credentials' | ||
description: | | ||
Collect the needed credentials for integration testing and place them in a | ||
directory named "rendered". Note that all of these secrets are | ||
assumed to be base64-encoded JSON service account keys. | ||
inputs: | ||
buffer-app-sa-b64: | ||
description: 'Base64-encoded buffer (RBS) service account' | ||
required: true | ||
janitor-sa-b64: | ||
description: 'Base64-encoded CRL Janitor service account' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Write credentials | ||
id: 'setup-user-delegated-creds' | ||
run: | | ||
mkdir -p rendered | ||
|
||
BUFFER_APP_SA_B64=${{ inputs.buffer-app-sa-b64 }} | ||
echo ::add-mask::BUFFER_APP_SA_B64 | ||
BUFFER_APP_SA=$(echo $BUFFER_APP_SA_B64 | base64 --decode) | ||
echo ::add-mask::$BUFFER_APP_SA | ||
echo $BUFFER_APP_SA > rendered/sa-account.json | ||
|
||
JANITOR_SA_B64=${{ inputs.janitor-sa-b64 }} | ||
echo ::add-mask::$JANITOR_SA_B64 | ||
JANITOR_SA=$(echo $JANITOR_SA_B64 | base64 --decode) | ||
echo ::add-mask::$JANITOR_SA | ||
echo $JANITOR_SA > rendered/janitor-client-sa-account.json | ||
shell: bash |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
The
write-credentials
action is not embedding the credential files within the test directory, which makes it different from whatlocal-dev/render-config.sh
does (and whatlocal-dev/run-local.sh
expects). However, I don't think that's a big deal, and to limit scope I'm not inclined to change how the service is run locally at this time. At some point we should likely follow the repo standards, which will involve creating a standard set of scripts, and we can unify the experience then.FWIW, I did verify that rendering credentials and running the service locally (following the directions in the README) does still work.