aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/do_release.sh
blob: 87e3b3acb45183618277fb1f2dbf391a0a9cf644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash

set -xuo pipefail

command -v zip || exit 1

rm -f app.zip

pushd app
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}"