Skip to content

Commit

Permalink
Added wait for deployment finished
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliaup committed Apr 30, 2024
1 parent 61a6538 commit 71051f0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,20 @@ jobs:
aws s3 cp deploy.zip s3://iic2173/deploy.zip
- name: Create CodeDeploy Deployment
# Almacena primero en un secret el deploymentId
id: create-deployment-trigger
run: |
deploymentId=$(aws deploy create-deployment\
aws deploy create-deployment --application-name \
IIC2173-CD-Ayudantia --deployment-group-name IIC2173-Group --region us-east-2 \
--s3-location bucket=iic2173,key=deploy.zip,bundleType=zip \
--file-exists-behavior OVERWRITE
--file-exists-behavior OVERWRITE || jq -r '.deploymentId')
echo "DeploymentId=$deploymentId" >> $GITHUB_OUTPUT
- name: Wait for deployment to finish
# deploymentId=$(cat $GITHUB_OUTPUT | grep DeploymentId | cut -d'=' -f2)
# aws deploy wait deployment-successful --deployment-id $deploymentId --region us-east-2
# Espera que el deployment termine
run: |
aws deploy wait deployment-successful --deployment-id ${{ steps.create-deployment-trigger.outputs.deploymentId }} --region us-east-2

0 comments on commit 71051f0

Please sign in to comment.