feat(docs): Unify path in cdash
[csit.git] / csit.infra.dash / do_release.sh
index ddf0eae..87e3b3a 100755 (executable)
@@ -1,13 +1,30 @@
 #!/usr/bin/env bash
 
-set -exuo pipefail
+set -xuo pipefail
 
 command -v zip || exit 1
 
 rm -f app.zip
 
 pushd app
-find . -type d -name "__pycache__" -exec rm -rf "{}" \; || true
-find . -type d -name ".webassets-cache" -exec rm -rf "{}" \; || true
+find . -type d -name "__pycache__" -exec rm -rf "{}" \;
+find . -type d -name ".webassets-cache" -exec rm -rf "{}" \;
 zip -r ../app.zip .
 popd
+
+pushd "../fdio.infra.terraform/"
+pushd "terraform-aws-fdio-csit-dash-app-base"
+export BUILD_ID=49
+export TF_VAR_application_version="${BUILD_ID-}"
+export TF_LOG=INFO
+rm -f terraform.tfstate
+terraform init
+terraform validate
+terraform apply -no-color -auto-approve
+application_version="$(terraform output application_version)"
+popd
+popd
+
+#aws --region eu-central-1 elasticbeanstalk update-environment \
+#    --environment-name fdio-csit-dash-env \
+#    --version-label "${application_version}"