forked from gtri/scrimmage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (36 loc) · 1.65 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
sudo: required
env:
global:
- ENCRYPTION_LABEL: dcc9512392ad
before_install:
- sudo apt-get install tar
install:
- echo '|1|hwoha+oiyHsKVrC9MhVGWVS26Pk=|GjfQxx3fU/0NzJb8DvMLSs9fXTc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA363sO9FUaRFrYc3JGHLRfVCe49YBXVJYHt4HUhv8qaId/gFmL9tuL4SHuB5POc6zn+QGFrCQXfOSDBPcFI/lveDLMFWBx3k942tvtU4UUsdI0+8yvddGoILu5Rrw78HLmfXUUpjC9Qo27EO7OEkDbg6ybdQr82sBCjtTT9s7p9PWwXs6QISxsEek0ECNuQGBbICM6gm91zXFnwLa3COicvUpLGpFd0/jncObi2MjFrnyDPgDJ922DKkriwFQ0lFLBriHl10RLH3/KZjmivwmiSV+1J+Kvatf767hkEydEESTwe9++RLDh9/ab4KoKYbQ65da16Ai8Z6XwoOKIm/FYw==' >> $HOME/.ssh/known_hosts
dist: trusty
language: cpp
services:
- docker
jobs:
include:
- stage: "Build Docker Images"
name: "Build on Ubuntu 16.04"
script:
- export REPO=$DOCKER_USERNAME/scrimmage
- docker build -t $REPO:${TRAVIS_BUILD_NUMBER} -f ./ci/dockerfiles/ubuntu-16.04 .
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- |
if [[ "$TAG" == "latest" ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker tag $REPO:$TRAVIS_BUILD_NUMBER $REPO:$TAG;
docker create --name mycontainer $REPO:$TAG;
docker cp mycontainer:/root/scrimmage/scrimmage/build/docs ./doc_output;
bash ./ci/scripts/deploy-docs.sh;
docker push $REPO;
fi
- name: "Build on Ubuntu 18.04"
script:
- docker build -t $DOCKER_USERNAME/scrimmage:${TRAVIS_BUILD_NUMBER}_ubuntu1804 -f ./ci/dockerfiles/ubuntu-18.04 .
notifications:
email:
on_success: change
on_failure: always