-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
41 lines (39 loc) · 861 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
35
36
37
38
39
40
41
language: cpp
sudo: required
services:
- docker
before_cache:
- ./manage.sh save_images
cache:
directories:
- $HOME/docker
env:
global:
- PROJECT_NAME=robustpalmroi
- DOCKER_REGISTRY=leosocy
- IMAGE=${DOCKER_REGISTRY}/${PROJECT_NAME}
- IMAGE_TAG=${IMAGE}:${TRAVIS_TAG}
stages:
- test_and_lint
- name: build_and_deploy_image
if: tag =~ ^v
jobs:
include:
- stage: test_and_lint
name: test
script:
- ./manage.sh test
- ./manage.sh upload_codecov
- stage: test_and_lint
name: lint
script:
- ./manage.sh lint
- stage: build_and_deploy_image
name: build and deploy image
before_script:
- >
echo "${HUB_DOCKER_REGISTRY_PASSWD}" |
docker login -u "${HUB_DOCKER_REGISTRY_USERNAME}" --password-stdin
script:
- docker build -t ${IMAGE_TAG} -f Dockerfile .
- docker push ${IMAGE_TAG}