Hello,
I am new to bitbucket. We have succcesfully configired bitbucket pipeline to push a repository branch to AWS EC2 instance using Code Build and Code Deploy.
But, the issue is, when we run the pipeline, it creates a zip file of entire repository and replaces the entire content on EC2. We want to push only the changes we did (say a single php file). Zipping entire repostiroy with images, and media files is a overkill and doesn't allow us to promote only bugfix.
How can we do that - any help will be great.
Pls. find our pipeline yml file content below.
- step: script:
- apt-get update
- apt-get install -y zip - zip -r appProd.zip
- pipe: atlassian/aws-code-deploy:0.2.5
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
APPLICATION_NAME: $APPLICATION_NAME
S3_BUCKET: $S3_BUCKET
COMMAND: "upload"
ZIP_FILE: "appProd.zip"
VERSION_LABEL: "app-web-prod-1.0.0"
- pipe: atlassian/aws-code-deploy:0.2.5
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
APPLICATION_NAME: $APPLICATION_NAME
DEPLOYMENT_GROUP: "xx_Www_Pppp"
S3_BUCKET: $S3_BUCKET
COMMAND: "deploy"
WAIT: "true"
VERSION_LABEL: "app-web-prod-1.0.0"
IGNORE_APPLICATION_STOP_FAILURES: "true"
FILE_EXISTS_BEHAVIOR: "OVERWRITE"