-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
47 lines (47 loc) · 1.29 KB
/
.travis.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
47
dist: bionic
language: node_js
node_js:
- 10
- 12
services:
- docker
env:
global:
- DEV_BRANCH=dev
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
cache:
npm: true
directories:
- "node_modules"
before_script:
- . ./travis/node-functions.sh
- VERSION="$(node_load_version)"
- log_env_variables
script:
- npm run build
jobs:
include:
- stage: test
name: lint
script: npm run lint
- stage: test
name: docker test build
script: /bin/bash travis/docker-functions.sh docker_build $VERSION
node_js: 10
- stage: publish
name: docker publish alpha
script: /bin/bash travis/docker-functions.sh docker_build $VERSION publish
if: branch = env(DEV_BRANCH) AND type = push
node_js: 10
- stage: release
name: docker publish release
script: /bin/bash travis/docker-functions.sh docker_build $VERSION release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
node_js: 10
- stage: post release
name: tag and version upgrade
script: /bin/bash travis/node-functions.sh node_post_release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
node_js: 10