-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
33 lines (25 loc) · 1.06 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
sudo: false
services:
- docker
language: python
python:
- "2.7"
install:
- pip install lain-cli
script:
- lain config save-global private_docker_registry registry.lain.local
- lain build
- LAIN_APPNAME=lvault
- LAIN_IMAGE_VERSION="$(git show -s --format=%ct $TRAVIS_COMMIT)-$TRAVIS_COMMIT"
- ci_env=`bash <(curl -s https://codecov.io/env)`
- docker run $ci_env --network=host --name lvault $LAIN_APPNAME:build-$LAIN_IMAGE_VERSION bash -c "sh test.sh && bash <(curl -s https://codecov.io/bash)"
after_success:
- LAIN_APPNAME=lvault
- LAIN_IMAGE_VERSION="$(git show -s --format=%ct $TRAVIS_COMMIT)-$TRAVIS_COMMIT"
- if [ "$TRAVIS_TAG" != "" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS";
docker tag $LAIN_APPNAME:release-$LAIN_IMAGE_VERSION laincloud/$LAIN_APPNAME:release-$LAIN_IMAGE_VERSION;
docker tag $LAIN_APPNAME:meta-$LAIN_IMAGE_VERSION laincloud/$LAIN_APPNAME:meta-$LAIN_IMAGE_VERSION;
docker push laincloud/$LAIN_APPNAME:release-$LAIN_IMAGE_VERSION;
docker push laincloud/$LAIN_APPNAME:meta-$LAIN_IMAGE_VERSION;
fi