-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
27 lines (25 loc) · 1.15 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.2
pipelines:
branches:
master:
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- apt-get install -y openssh-client
- touch randomtext.txt
- echo "$BITBUCKET_BRANCH" > randomtext.txt
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- tar -czf /tmp/$BITBUCKET_BRANCH.tar.gz .
- ssh [email protected] 'bash -s' < execute.sh
- scp /tmp/$BITBUCKET_BRANCH.tar.gz [email protected]:/home/test-project/config/$BITBUCKET_BRANCH.tar.gz
- scp randomtext.txt [email protected]:/home/test-project/config/randomtext.txt
- ssh [email protected] 'bash -s' < create_folder.sh
- rm -r /tmp/$BITBUCKET_BRANCH.tar.gz