forked from F5Networks/marathon-bigip-ctlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (45 loc) · 1.76 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
45
46
47
language: bash
sudo: required
services:
- docker
before_install:
- docker pull f5devcentral/containthedocs
- docker pull f5devcentral/attributions-generator
script:
- set -e
- if [ "$DOCKER_NAMESPACE" == "" ]; then DOCKER_NAMESPACE="local"; fi
- BASE_PUSH_TARGET="$DOCKER_NAMESPACE/marathon-bigip-ctlr"
- |
if [ "$DOCKER_P" == "" -o "$DOCKER_U" == "" -o $DOCKER_NAMESPACE == "" ]; then
echo "[INFO] Docker user, password, or namespace vars absent from travis-ci."
echo "[INFO] See README.md section 'build' to configure travis with DockerHub."
else
docker login -u="$DOCKER_U" -p="$DOCKER_P"
DOCKER_READY="true"
fi
- export IMG_TAG="${BASE_PUSH_TARGET}:${TRAVIS_COMMIT}"
- export BUILD_IMG_TAG="${BASE_PUSH_TARGET}-devel:${TRAVIS_COMMIT}"
- export COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- ./build-tools/build-devel-image.sh
- ./build-tools/run-in-docker.sh make python-sanity
- make att-gen
- cp ATTRIBUTIONS.md docs/_static
- make test-docs
- ./build-tools/build-runtime-images.sh
- docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
- docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID"
- |
if [ "$DOCKER_READY" ]; then
docker push "$IMG_TAG"
docker push "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
docker push \
"$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID"
fi
- |
if [ "$TRAVIS_TAG" == "1.0-stable" ]; then
docker run -it f5devcentral/containthedocs publish-product-docs-to-prod connectors/marathon-bigip-ctlr v1.0
fi
- |
if [ "$TRAVIS_REPO_SLUG" == "F5Networks/k8s-bigip-ctlr" -o "$COVERALLS_REPO_TOKEN" ]; then
./build-tools/run-in-docker.sh coveralls
fi