forked from F5Networks/f5-ipam-ctlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (46 loc) · 1.64 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
language: go
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/f5-ipam-ctlr"
- 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)
- |
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
- export CLEAN_BUILD=true
- export BASE_OS=alpine
- make verify
- make prod
- make docs
deploy:
- provider: script
skip_cleanup: true
on:
all_branches: true
repo: F5Networks/f5-ipam-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 ipam-ctlr $CTLR_VERSION