-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (37 loc) · 1.63 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
dist: bionic
language: generic
os: linux
services:
- docker
git:
depth: 5
jobs:
include:
- name: build nodejs
if: (NOT repo =~ ^vscode-icons OR branch != master OR type = pull_request) AND NOT env(VSI_TAG) IS present AND NOT tag IS present
script:
- travis_wait 60 docker build --rm -q -f nodejs/Dockerfile -t nodejs nodejs
- name: build and deploy nodejs:latest
if: repo =~ ^vscode-icons AND branch = master AND NOT tag IS present AND type != pull_request AND NOT env(VSI_TAG) IS present
script:
- travis_wait 60 docker build --rm -q -f nodejs/Dockerfile -t $DOCKER_REPONAME/nodejs:latest nodejs
- docker images
after_success:
- echo $DOCKER_PASSWORD | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $DOCKER_REPONAME/nodejs:latest
- name: build and deploy nodejs:[tag]
if: repo =~ ^vscode-icons AND tag IS present AND type != pull_request AND NOT env(VSI_TAG) IS present
script:
- travis_wait 60 docker build --rm -q -f nodejs/Dockerfile -t $DOCKER_REPONAME/nodejs:$TRAVIS_TAG nodejs
- docker images
after_success:
- echo $DOCKER_PASSWORD | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $DOCKER_REPONAME/nodejs:$TRAVIS_TAG
- name: build and deploy vsi:[tag]
if: repo =~ ^vscode-icons AND env(VSI_TAG) =~ ^latest|[0-9.]+-*[a-zA-Z0-9]* AND type = api
script:
- docker build --rm -q -f vsi/Dockerfile -t $DOCKER_REPONAME/vsi:$VSI_TAG vsi
- docker images
after_success:
- echo $DOCKER_PASSWORD | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $DOCKER_REPONAME/vsi:$VSI_TAG