From 90b63575c59ee6ff6b91806fd17fb7a2f1136762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 9 Dec 2018 14:11:54 +0100 Subject: Add environment variables --- roles/contexts/fretlink/templates/environment.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2 index e5e2c64..50dc75b 100644 --- a/roles/contexts/fretlink/templates/environment.j2 +++ b/roles/contexts/fretlink/templates/environment.j2 @@ -36,8 +36,9 @@ build_macaroon() { target="uri://fretlink/$3" realm="$4" - cd "$HOME/workdir/haskell-commons" + pushd "$HOME/workdir/haskell-commons" >/dev/null 2>/dev/null MACAROON_PRIVATE_KEY="$secret" MACAROON_SECRET="$secret" stack exec macaroon-bakery -- $action --location "$target" --key-id "$src" $ttl "$realm" + popd 2>/dev/null >/dev/null } APP=$(basename $(pwd)) @@ -197,7 +198,8 @@ if [ "$APP" = "notifier" ]; then export MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)" # To push transporeon cargos to app - APP_TRANSPOREON_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" + export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo" + export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" fi if [ "$APP" = "pricer" ]; then -- cgit v1.2.3