forked from tokend/erc20-withdraw-svc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 930 Bytes
/
.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
dist: bionic
addons:
apt:
source:
- docker-bionic
packages:
- docker
services:
- docker
env:
global:
- PROJECT: tokend
- IMAGE_NAME: erc20-withdraw-svc
script:
- export IMAGE_TAG=$(test -z $TRAVIS_TAG && echo $TRAVIS_COMMIT || echo $TRAVIS_TAG)
- docker build -t $PROJECT/$IMAGE_NAME:$IMAGE_TAG .
before_deploy:
- echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
- echo "$GITLABREG_PASSWORD" | docker login -u "$GITLABREG_USERNAME" --password-stdin
registry.gitlab.com
- docker tag $PROJECT/$IMAGE_NAME:$IMAGE_TAG registry.gitlab.com/$PROJECT/docker-registry/$IMAGE_NAME:$IMAGE_TAG
deploy:
- provider: script
script:
- docker push $PROJECT/$IMAGE_NAME:$IMAGE_TAG
on:
all_branches: true
tags: true
- provider: script
script:
- docker push registry.gitlab.com/$PROJECT/docker-registry/$IMAGE_NAME:$IMAGE_TAG
on:
all_branches: true
tags: false