-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
40 lines (32 loc) · 1.12 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
sudo: required
services:
- docker
language: minimal
git:
submodules: true
before_install:
- docker pull debian:buster-slim
before_script:
- docker run -e "WORKSPACE=$TRAVIS_BUILD_DIR" -v $TRAVIS_BUILD_DIR:/travis --name vfrb -dit debian:buster-slim bash
- docker ps -a
- docker exec -it vfrb sh -c "echo 'deb http://ftp.debian.org/debian buster-backports main' >> /etc/apt/sources.list"
script:
# build production docker image
- ./run.sh docker
# prepare cicd docker image
- docker exec -it vfrb sh -c "mkdir -p $TRAVIS_BUILD_DIR"
- docker exec -it vfrb sh -c "cp -r /travis/. $TRAVIS_BUILD_DIR"
# run build and tests
- docker exec -it vfrb sh -c "$TRAVIS_BUILD_DIR/run.sh build test -y"
# copy reports back
- docker exec -it vfrb sh -c "cp -r $TRAVIS_BUILD_DIR/reports /travis/"
- docker exec -it vfrb sh -c "chown $(id -u):$(id -g) -R /travis/reports"
- docker stop vfrb
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
email:
recipients:
on_success: change
on_failure: change