-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix secrets stored in json format (#466)
* fix secrets in json format * fix actionlint * add more comments and docs * revert build.yml test * add test for json * fix selector * fix e2e test * fix e2e test 2 * remove test * remove isNaN check * update changelog
- Loading branch information
1 parent
62aa8bb
commit b9f4d16
Showing
11 changed files
with
206 additions
and
32 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,44 @@ jobs: | |
name: local-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Import Secrets | ||
uses: hashicorp/vault-action@YOUR_BRANCH_NAME | ||
with: | ||
url: http://localhost:8200 | ||
method: token | ||
token: testtoken | ||
secrets: | | ||
secret/data/test secret | SAMPLE_SECRET; | ||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
|
||
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version: '16.14.0' | ||
|
||
- name: NPM Install | ||
run: npm ci | ||
|
||
- name: NPM Build | ||
run: npm run build | ||
|
||
- name: Setup Vault | ||
run: node ./integrationTests/e2e/setup.js | ||
env: | ||
VAULT_HOST: localhost | ||
VAULT_PORT: 8200 | ||
|
||
- name: Import Secrets | ||
id: import-secrets | ||
# use the local changes | ||
uses: ./ | ||
# run against a specific version of vault-action | ||
# uses: hashicorp/[email protected] | ||
with: | ||
url: http://localhost:8200 | ||
method: token | ||
token: testtoken | ||
secrets: | | ||
secret/data/test-json-string jsonString; | ||
- name: Check Secrets | ||
run: | | ||
touch secrets.json | ||
echo "${{ steps.import-secrets.outputs.jsonString }}" >> secrets.json | ||
- name: Check json file format | ||
run: | | ||
echo | ||
cat secrets.json | ||
jq -c . < secrets.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.PHONY: local-test | ||
local-test: | ||
docker compose down; docker-compose up -d vault && act workflow_dispatch -j local-test |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,4 @@ describe('exportSecrets retries', () => { | |
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
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