-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitbucket-pipelines.yml
46 lines (45 loc) · 1.46 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN 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: node:12.13.0-alpine
pipelines:
default:
- step:
name: Install & Build
caches:
- node
script: # Modify the commands below to build your repository.
- npm install
- npm run build
- npm test
branches:
master:
- step:
name: Install & Build
caches:
- node
script: # Modify the commands below to build your repository.
- npm install
- npm run build
- npm test
- step:
name: Create artifact
script:
- mkdir artefacts
- tar -czf artefacts/my-app-$BITBUCKET_BUILD_NUMBER.tar.gz --exclude=./artefacts .
- cp artefacts/* .
artifacts:
- my-app-*.tar.gz
- step:
name: Deploy to production
deployment: production
script:
- pipe: atlassian/heroku-deploy:1.0.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: 'my-app-$BITBUCKET_BUILD_NUMBER.tar.gz'
WAIT: 'true' # Optional.
DEBUG: 'true' # Optional