This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
86 lines (82 loc) · 3.79 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
language: bash
sudo: required
services:
- docker
git:
# don't limit git clone depth
depth: false
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 BUILD_VERSION=$(build-tools/version-tool version)
- export BUILD_INFO=$(build-tools/version-tool build-info)
- if [ "$TRAVIS_TAG" == "$TRAVIS_BRANCH" ]; then BUILD_VERSION=$TRAVIS_TAG; fi
- export IMG_TAG="${BASE_PUSH_TARGET}:${TRAVIS_COMMIT}"
- export BUILD_IMG_TAG="${BASE_PUSH_TARGET}-devel:${TRAVIS_COMMIT}"
- export BUILD_STAMP=devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID-$(date +%s)
- export COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- |
if [[ "$TRAVIS_BRANCH" == *"-stable" ]]; then
export CTLR_VERSION=v$(echo $TRAVIS_BRANCH | sed s/-stable//g)
export LICENSE_STRICT=false
elif [[ "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]* ]]; then
va=( ${TRAVIS_BRANCH//./ } ) # replace decimals and split into array
export CTLR_VERSION="${va[0]}.${va[1]}"
export LICENSE_STRICT=true
else
export CTLR_VERSION=$TRAVIS_BRANCH
export LICENSE_STRICT=false
fi
- ./build-tools/build-devel-image.sh
- ./build-tools/run-in-docker.sh make python-sanity
- ./build-tools/build-runtime-images.sh
- |
if [ "$DOCKER_READY" ]; then
docker tag "$IMG_TAG" "$BASE_PUSH_TARGET"
docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_STAMP"
docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_VERSION"
docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_VERSION-$BUILD_INFO"
docker push "$IMG_TAG"
docker push "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
docker push "$BASE_PUSH_TARGET:$BUILD_STAMP"
docker push "$BASE_PUSH_TARGET:$BUILD_VERSION"
docker push "$BASE_PUSH_TARGET:$BUILD_VERSION-$BUILD_INFO"
docker push "$BASE_PUSH_TARGET:latest"
fi
- |
if [ "$TRAVIS_REPO_SLUG" == "F5Networks/k8s-bigip-ctlr" -o "$COVERALLS_REPO_TOKEN" ]; then
./build-tools/run-in-docker.sh coveralls
fi
- make att-gen
- cp ATTRIBUTIONS.md docs/_static
- make test-docs
deploy:
- provider: script
skip_cleanup: true
on:
all_branches: true
repo: F5Networks/marathon-bigip-ctlr
condition: $TRAVIS_BRANCH == *"-stable" || "$TRAVIS_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]*
script:
- ./build-tools/deploy-docs.sh publish-product-docs-to-prod connectors/marathon-bigip-ctlr $CTLR_VERSION
notifications:
slack:
rooms:
# marathon channel
- secure: reSKFzFdKPRawR2bb8OcMHMwcFnyFOnP5Z46MUKi0D1UQ7wB1OsQQz7hDzOlhjriFMQeE5atRCk35ZURvfBSg0PZPAO6oxdv2JYDqcFlfOAlMrSinhD3EiBBlNUqzJvo13VA/xsUSRBXcCFt0YF9r/xbyXusKAk/ALS+Gn9vgfXahJDH1pN1LJEA5PxpD371Dp9c4a5+su1n5gjerFP8fwV6eT8R02fiyTarFw89naUa9jnAzvqwvHbCoI1yFSE5lmRIak3qFzSwhdyUk2YRyn44WH2fROIAvAOHF+46z3SI7LUVagBsNNmBxl1pnTQf6ASTKiSif3RffcA4eiJp0Sxdz6gYR6vC75km92M73YTLjdbqtCnboPtzE3V3OKuItcIlMQe6wdfT0eHG8EzAr/AJKIpG6bNSCi+NpN/mk5On09+5HUPwCvqsqoHDKeCZSP/qEqp4MqdNQ7I8DdDdhiN7nQso9pus3ADCPG6iZ1EQmgeb4kpLhfNcmXChvJjM2LGrfg9ewXnzj0+FNx3+4ULSDLf0P/IgoaegWWLmUFX2E1vWen/XKZ+Yi+98vLM/bs6GF0GD0DNxM2/ftAfBdQ5QrqCh3OGFk0fBCBnmpHay4VTcN79O0d4eOEvzLKoOD0nD6LWbBZmRBbmF4Mz3QP5e/sKHzkKiLX4huP9SFRI=
on_success: change
on_failure: always
on_pull_requests: false