-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
27 lines (27 loc) · 1.31 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
27
# 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.
pipelines:
default:
- step:
image: tfirdaus/wp-docklines:php7.2-fpm-alpine
name: "PHP 7.2"
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
tags:
'*':
- step:
image: tfirdaus/wp-docklines:php7.2-fpm-alpine
name: Build release
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 --optimize-autoloader --no-dev
- echo $BITBUCKET_REPO_SLUG
- echo $BITBUCKET_TAG
- composer archive --format=zip --file ${BITBUCKET_REPO_SLUG}-${BITBUCKET_TAG}
- curl -u ${BUILD_AUTH_STRING} -X POST "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"$BITBUCKET_REPO_SLUG-$BITBUCKET_TAG.zip"