-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
43 lines (40 loc) · 1.49 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
sudo: required
language: node_js
node_js: "8"
jobs:
include:
- stage: Lint
script: npm run lint
- stage: Audit
script: npm audit --production
- stage: Build and push image
services:
- docker
install: skip
before_script:
- docker build -t tomochain/tomoissuer .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag tomochain/tomoissuer tomochain/tomoissuer:latest
- docker push tomochain/tomoissuer:latest
- docker tag tomochain/tomoissuer tomochain/tomoissuer:$TRAVIS_BUILD_ID
- docker push tomochain/tomoissuer:$TRAVIS_BUILD_ID
- stage: Build and push image (tagged)
services:
- docker
install: skip
before_script:
- docker build -t tomochain/tomoissuer .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag tomochain/tomoissuer tomochain/tomoissuer:latest
- docker push tomochain/tomoissuer:latest
- docker tag tomochain/tomoissuer tomochain/tomoissuer:$TRAVIS_TAG
- docker push tomochain/tomoissuer:$TRAVIS_TAG
stages:
- name: Lint
- name: Test
- name: Build and push image
if: type != pull_request AND branch =~ ^v AND tag IS blank AND repo = tomochain/tomoissuer
- name: Build and push image (tagged)
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = tomochain/tomoissuer