-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (32 loc) · 1.01 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
# required variables (configure your pipeline to store these)
# DH_USERNAME: DockerHub username
# DH_PASSWORD: DockerHub password
# DH_REGISTRY: Registry hostname
# DH_NAMESPACE: Image namespace
# DH_IMAGE: Image name
# GH_USERNAME: GitHub username
# GH_TOKEN: GitHub token
# GH_NAMESPACE: GitHub namespace name
# GH_REPO: GitHub repository name
sudo: required
language: bash
if: branch = master
services:
- docker
before_script:
- docker login -u "${DH_USERNAME}" -p "${DH_PASSWORD}";
after_script:
- docker logout
script:
# prepare Makefile.properties
- echo "DOCKERREGISTRY=${DH_REGISTRY}" > Makefile.properties
- echo "DOCKERUSER=${DH_NAMESPACE}" >> Makefile.properties
- echo "DOCKERIMAGE=${DH_IMAGE}" >> Makefile.properties
# run the build/publish, see Makefile for more info
- make build
- git checkout ${TRAVIS_BRANCH}
- make iterate.version
- git remote set-url origin https://${GH_USERNAME}:${GH_TOKEN}@github.com/${GH_NAMESPACE}/${GH_REPO}.git
- git push --tags
- make publish
- make publish.version