forked from cubedro/eth-netstats
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
46 lines (41 loc) · 1.55 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
sudo: required
language: node_js
node_js: "8"
script: skip
jobs:
include:
- stage: Tests
script: echo "No tests at the moment"
- stage: Build and push image
services:
- docker
install: skip
before_script:
- docker build -t tomochain/netstats .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag tomochain/netstats tomochain/netstats:latest
- docker push tomochain/netstats:latest
- docker tag tomochain/netstats tomochain/netstats:$TRAVIS_BUILD_ID
- docker push tomochain/netstats:$TRAVIS_BUILD_ID
- stage: Build and push image (tagged)
services:
- docker
install: skip
before_script:
- docker build -t tomochain/netstats .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag tomochain/netstats tomochain/netstats:latest
- docker push tomochain/netstats:latest
- docker tag tomochain/netstats tomochain/netstats:testnet
- docker push tomochain/netstats:testnet
- docker tag tomochain/netstats tomochain/netstats:$TRAVIS_TAG
- docker push tomochain/netstats:$TRAVIS_TAG
stages:
- name: Lint
- name: Tests
- name: Build and push image
if: type != pull_request AND branch = master AND tag IS blank AND repo = tomochain/netstats
- name: Build and push image (tagged)
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = tomochain/netstats