Files
crypt-keeper-extension/.github/scripts/deploy.sh
ntampakas 4b7820a85a chore: aws infrastructure (docker + deploy workflow) (#653)
* Add workflow + aux scripts to support deploy via codedeploy
* Fix role ARN
* Fix role scripts + rename Dockerfiles
* Fix role scripts
* Create .env file
* Manipulate .env in build script
* Remove .env (used while testing)
* Fix typo
* Move Dockerfiles into packages
* Fixed typo
2023-07-18 11:42:05 -05:00

22 lines
720 B
Bash
Executable File

#!/bin/bash
set -x
COMMIT_HASH=$(git rev-parse HEAD)
DEPLOY_ID=$(aws deploy create-deployment --application-name crypt-keeper-extension-prod --deployment-group-name crypt-keeper-extension-prod-group --github-location repository=$GITHUB_REPOSITORY,commitId=$COMMIT_HASH --ignore-application-stop-failures --file-exists OVERWRITE --output text)
while true; do
STATUS=$(aws deploy get-deployment --deployment-id $DEPLOY_ID --query 'deploymentInfo.status' --output text)
if [ $STATUS != "InProgress" ] && [ $STATUS != "Created" ]; then
if [ $STATUS = "Succeeded" ]; then
echo "SUCCESS"
exit 0
else
echo "Failed"
exit 1
fi
else
echo "Deploying..."
fi
sleep 30
done