Hi Team,
I am facing the issue of with pipeline, as there are 3 steps 2 are working fine, the last one aws code deploy isnt working , while deployment its having issue.
Also I have a question that the artifact which is going to s3, from there how aws code deploy will recognize my path, my path is /var/www/html
here is codes : and the screenshots
Please help me :(
image: node:10.15.0
pipelines:
default:
- step:
name: Build
script:
- apt-get update -y
- cd admin/front-end/
- npm install
- CI=false
- npm run build
- apt-get install -y zip
- zip -r myapp.zip *
artifacts:
- admin/front-end/myapp.zip
- step:
name: Upload to S3
script:
- pipe: atlassian/aws-code-deploy:0.2.3
variables:
AWS_DEFAULT_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: 'AKIAXWJT4X2UTL2URGQJ'
AWS_SECRET_ACCESS_KEY: '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'
COMMAND: 'upload'
APPLICATION_NAME: 'codedeployapplication'
ZIP_FILE: 'admin/front-end/myapp.zip'
S3_BUCKET: 'codedeployrole'
VERSION_LABEL: 'my-app-1.0.0'
- step:
name: Deploy with CodeDeploy
services:
- docker
script:
- pipe: atlassian/aws-code-deploy:0.2.6
variables:
AWS_DEFAULT_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: 'AKIAXWJT4X2UTL2URGQJ'
AWS_SECRET_ACCESS_KEY: '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'
COMMAND: 'deploy'
APPLICATION_NAME: 'codedeployapplication'
DEPLOYMENT_GROUP: 'DG1'
WAIT: 'true'
S3_BUCKET: 'codedeployrole'
VERSION_LABEL: 'my-app-1.0.0'
IGNORE_APPLICATION_STOP_FAILURES: 'true'
FILE_EXISTS_BEHAVIOR: 'OVERWRITE'
Hey @rao999 . On the last screenshot I can see that the error code is HEALTH_CONSTRAINTS, which means that code deploy is having issues to deploy your code to EC2 instances. I would first check the following:
Some useful links:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.