Skip to content

Commit

Permalink
Fixing a deployment bug.
Browse files Browse the repository at this point in the history
Deployment to s3 only worked if your deployment region matched the
default set in `~/.aws/config`. That's now fixed.
  • Loading branch information
Kris Jenkins authored and krisajenkins committed Jan 26, 2021
1 parent 03d0f3b commit 2bfb3e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deployment/default.nix
Expand Up @@ -56,10 +56,12 @@ let
plutus_playground_lambda_file="${plutus-playground-lambda}/plutus-playground-lambda.zip"'';
};

syncS3 = env:
syncS3 = env: region:
writeShellScript "syncs3" ''
set -eou pipefail
export AWS_REGION=${region}
echo "sync with S3"
${plutus.thorp}/bin/thorp -b marlowe-playground-website-${env} -s ${static.marlowe}
${plutus.thorp}/bin/thorp -b plutus-playground-website-${env} -s ${static.plutus}
Expand Down Expand Up @@ -115,7 +117,7 @@ let
set -eou pipefail
${applyTerraform env region}
${syncS3 env}
${syncS3 env region}
echo "done"
'';

Expand Down Expand Up @@ -149,7 +151,7 @@ let

mkEnv = env: region: {
inherit terraform-vars terraform-locals terraform;
syncS3 = (syncS3 env);
syncS3 = (syncS3 env region);
applyTerraform = (applyTerraform env region);
deploy = (deploy env region);
destroy = (destroy env region);
Expand Down

0 comments on commit 2bfb3e7

Please sign in to comment.