From 3a33c6afdc1cddf8898551c1464540b59b5d826f Mon Sep 17 00:00:00 2001 From: joergi <1439809+joergi@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:37:27 +0200 Subject: [PATCH] corrects export #4 --- .github/workflows/testing.yml | 9 ++++++--- vault-docker/run.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c09a4d6..a500966 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,6 +4,9 @@ on: branches: [ main ] workflow_dispatch: {} +env: + VAULT_ADDR: http://127.0.0.1:8200 + jobs: bash-linux: runs-on: ubuntu-latest @@ -30,13 +33,13 @@ jobs: docker ps echo "docker images" docker images - echo "export vault addr" - export VAULT_ADDR=http://127.0.0.1:8200 +# echo "export vault addr" +# export VAULT_ADDR=http://127.0.0.1:8200 echo "vault status" vault status echo "login to vault" vault login token=vault-plaintext-root-token vault status - export MYKEY=$(vault kv get -field=MY_PASSWORD /secrets/my-secrets) + export MYKEY=$(vault kv get -field=password /my-secrets/dev) echo $MKEY diff --git a/vault-docker/run.sh b/vault-docker/run.sh index 4672901..4aa7b92 100755 --- a/vault-docker/run.sh +++ b/vault-docker/run.sh @@ -11,7 +11,7 @@ done echo "Authenticating to vault..." vault login token=vault-plaintext-root-token echo "Initializing vault..." -vault secrets enable -version=2 -path=my-secrets kv +vault secrets enable -version=1 -path=my-secrets kv echo "Adding entries..." vault kv put my-secrets/dev username=test_user vault kv put my-secrets/dev password=test_password