From dba78f04c25594562bada1be894e8e55b10527fe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Jul 2018 21:17:17 +0200 Subject: [PATCH] create-amis.sh: Change directory for AMIs (cherry picked from commit b240822cfaa80145491b7fcfe6421d7a10f6de94) --- nixos/maintainers/scripts/ec2/create-amis.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh index 347e6b9c6e0..d477cdc37c4 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 '' -A lib.nixpkgsVersion | se 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