Skip to content

Commit

Permalink
trying to manage error
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliaup committed Apr 30, 2024
1 parent 320cfd9 commit d9ccf9d
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,26 @@ jobs:
run: |
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 --application-name \
# IIC2173-CD-Ayudantia --deployment-group-name IIC2173-Group --region us-east-2 \
# --s3-location bucket=iic2173,key=deploy.zip,bundleType=zip \
# --description "Automatic deployment from githubactions commit ${{github.sha}}" | jq -r '.deploymentId')
# echo "DeploymentId=$deploymentId" >> $GITHUB_OUTPUT

- name: Create CodeDeploy Deployment
# Almacena primero en un secret el deploymentId
id: create-deployment-trigger
run: |
deploymentId=$(\
aws deploy create-deployment --application-name \
deploymentId=$(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 \
--description "Automatic deployment from githubactions commit ${{github.sha}}" | 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}}
aws deploy wait deployment-successful --deployment-id ${{ steps.create-deployment-trigger.outputs.deploymentId }}

0 comments on commit d9ccf9d

Please sign in to comment.