diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-07-24 21:17:17 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-07-24 21:19:14 +0200 |
commit | b240822cfaa80145491b7fcfe6421d7a10f6de94 (patch) | |
tree | 014761bda1e87b66be3b843be4b91fcb6d10891f | |
parent | 4c0cc62d2976f0e25dad0fa6810980ea04a16092 (diff) |
create-amis.sh: Change directory for AMIs
-rwxr-xr-x | nixos/maintainers/scripts/ec2/create-amis.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh index 9461144fad5..790cc6cbc53 100755 --- a/nixos/maintainers/scripts/ec2/create-amis.sh +++ b/nixos/maintainers/scripts/ec2/create-amis.sh @@ -10,7 +10,7 @@ version=$(nix-instantiate --eval --strict '<nixpkgs>' -A lib.version | sed s/'"' major=${version:0:5} echo "NixOS version is $version ($major)" -stateDir=/var/tmp/ec2-image-$version +stateDir=/home/deploy/amis/ec2-image-$version echo "keeping state in $stateDir" mkdir -p $stateDir @@ -161,6 +161,7 @@ for type in $types; do # Create a snapshot. if [ -z "$snapId" ]; then echo "creating snapshot..." + # FIXME: this can fail with InvalidVolume.NotFound. Eventual consistency yay. snapId=$(aws ec2 create-snapshot --volume-id "$volId" --region "$region" --description "$description" | jq -r .SnapshotId) if [ "$snapId" = null ]; then exit 1; fi echo -n "$snapId" > $stateDir/$region.$type.snap-id |