You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I have an appspec.yml file which defines where to deploy the build. (Bitbucket > AWS S3 > AWS Codedeploy > aws EC2 instance)
version: 0.0os:
linux files: - source: /
destination: /var/www/vhosts/<domain>
I want the .php file to be deployed in /var/www/vhosts/<domain>/httpdocs directory?
Can I achieve that using appspec.yml or in bitbucket-pipeline.yml? Thank you in advance!
my .yml:
image: atlassian/default-image:latest
pipelines:
default:
- step:
name: Install dependencies
image: composer
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --ignore-platform-reqs
- step:
name: Deploy to Staging
deployment: Staging
# trigger: manual # Uncomment to make this a manual step
script:
- apt-get update
- apt-get install -y zip
- apt-get install -y git
- git clone https://username@bitbucket.org/repository/projectgit
- zip -r application1.zip .
- pipe: atlassian/aws-code-deploy:0.5.3
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: 'application1.zip'
VERSION_LABEL: 'my-app-1.0.0'
- pipe: atlassian/aws-code-deploy:0.5.3
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: $DEPLOYMENT_GROUP
S3_BUCKET: $S3_BUCKET
COMMAND: 'deploy'
WAIT: 'true'
VERSION_LABEL: 'my-app-1.0.0'
IGNORE_APPLICATION_STOP_FAILURES: 'true'
FILE_EXISTS_BEHAVIOR: 'OVERWRITE'
- step:
name: Manual Step Deploy to PROD
image: php:7.2-cli
deployment: Production
trigger: manual
script:
- echo "This step runs once you click the 'Run' button"
PS: not sure why the yml is not indented. I tried copying from notepad++. sublime text but same output.
For meantime, I deployed all files in httpdocs directory. I edited my appspec.yml file.
version: 0.0
os: linux
files: - source: /
destination: /var/www/vhosts/<domain>/httpdocs/
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.