forked from FIWARE/context.Orion-LD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
137 lines (120 loc) · 6.86 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
dist: xenial
language: minimal
env:
global:
- IMAGE_RELEASE_DEBIAN=fiware/orion-ld
- IMAGE_RELEASE_CENTOS=fiware/orion-ld:centos
- IMAGE_DEPS_DEBIAN=fiware/orion-ld:deps-debian
- IMAGE_DEPS_CENTOS=fiware/orion-ld:deps-centos
- HOME=/opt/orion
- secure: tVGPaHVXk+oRNs3civESLFQImhM5bpYTbjk9SXwHg/2hdX5laANEtxAKS8k7X5TZwj2oMV8nDzJojU1NOm3292IZsP/0BijCnkwSrLgN2zi/AK8FmiO0KT9+jkQH7T8/K9KisqVSUIaBFlIlFhhDwR2OPGjlPWZpt7DuTePNV4jgFhkMjfROzLZDc4aWA7uzKvw4XTegMvP/lRiU3urlTqJGXuKaCmkQeTHr1cGPbnycAqwDKYKxzKQdRhyQT96+MsZnfwgg8JLKQJpqEIFVQ22rxoZWUZaYbMpDJP1ZPnoF7v12ODNoFoZM7xWom98VAQ6L7SBcY7laInfa/N7zzu0GeIjGa7RwigLy9BPmOfpXBOSifdcAE6sZ9vLYoMKdE4SOYZ8uOfeuK5kJe0AY4tqVvCvuTdsQp0wmCnd8spH3L9sHlt7QJz+q+RklhFk2h9duyPNr5mfv/maWF8lJz/9eR8Lmmzeg/B79nvZEd2eCOYi2I9HcAucYZL4bZXIW6ROnf5WFdPcb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leYvVTpzza9di6bqJf/hQN6z07gnhkAX3Ypz3JNPDYuFjK0jHwhkDFeN91FmoShuB5dOuvs16fXojjxYJDwMQIW/Eo0WjVEV6qhGtnYI6RnGFDI6Cc/NjDN4CAmssarj8pXdAQSzQVzSXohxsILIMuY1QdQpwLjJJdmHMwtPegeS49PCIaRKpgKPR9/FuqUpRFFkAX6Hy0fxC9rRkSTCSIwpFL37PWpRZKE5e12wNZPPDK2A2gpFIruv/upDmL1dhK5YjNoMENtBgOrG3Uo/YfCIEngDesNzE9XwGisW1u4TqaQ1rNVrdezS4KzC1njnjqw6MC+w9rCUNk4d/lR1y/h0q68Pa3c7IdLWUhdKDjLPAZdH0G4dpRxpZzwV/ocBmWSwcWT+74hBe1BC8kWPL7J2Q0T7IxcLDEKQvnfT1q2/Gg4oPrgh3Zp2mOrXtTKgmCHo5FrNdTnI=
stages:
- test
- name: deploy
if: branch = develop
jobs:
include:
- env: STAGE=compliance
name: "Compliance Tests"
stage: test
install: true
script: >
echo -e " \033[1;33mRunning Compliance Tests";
$(pwd)/docker/build.sh -s compliance -t -p $(pwd);
- env: STAGE=debian_unit
name: "Unit Tests (Debian)"
stage: test
- env: STAGE=debian_functional_1_450
name: "Functional Tests 1-450 (Debian)"
stage: test
- env: STAGE=debian_functional_451_700
name: "Functional Tests 451-700 (Debian)"
stage: test
- env: STAGE=debian_functional_701_1000
name: "Functional Tests 701-1000 (Debian)"
stage: test
- env: STAGE=debian_functional_1001_1400
name: "Functional Tests 1001-1400 (Debian)"
stage: test
- env: STAGE=debian_release
name: "Deploy to Docker Hub"
stage: deploy
install: >
if [[ "${PUSH_STATUS}" ]]; then
echo -e " \033[1;33mBuilding Debian Docker image for Release";
travis_wait 30 docker build --no-cache --quiet \
--build-arg TOKEN=${TOKEN} \
--build-arg REV=${TRAVIS_COMMIT} \
--build-arg STAGE=release -t ${IMAGE_RELEASE_DEBIAN} \
-f $(pwd)/docker/Dockerfile-debian $(pwd)/docker/ ;
fi
script: true
after_success: >
if [[ "${PUSH_STATUS}" ]]; then
echo -e " \033[1;33mPushing Debian Release to Docker Hub";
docker push ${IMAGE_RELEASE_DEBIAN};
fi
- env: STAGE=debian_deps
name: "Deploy to Docker Hub - Image with Deps"
stage: deploy
install: >
if [[ "${PUSH_STATUS}" ]]; then
travis_wait 30 docker build --no-cache --quiet \
--build-arg TOKEN=${TOKEN} \
--build-arg REV=${TRAVIS_COMMIT} \
--build-arg STAGE=deps -t ${IMAGE_DEPS_DEBIAN} \
-f $(pwd)/docker/Dockerfile-debian $(pwd)/docker/ ;
fi
script: true
after_success: >
if [[ "${PUSH_STATUS}" ]]; then
echo -e " \033[1;33mPushing Debian Release (with Dependencies) to Docker Hub";
docker push ${IMAGE_DEPS_DEBIAN};
fi
allow_failures:
- env: STAGE=debian_integration
before_install: >
export PLATFORM=$(echo ${STAGE} | cut -c1-6);
export STAGE_TYPE=$(echo ${STAGE} | cut -c8-);
if [[ "${PUSH}" && ${TRAVIS_BRANCH} == "develop" && ${TRAVIS_EVENT_TYPE} == "push" ]]; then
export PUSH_STATUS="True";
fi
if [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" && "${STAGE_TYPE}" != "release" && "${STAGE_TYPE}" != "deps" ]]; then
export TEST_STATUS="True";
fi
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin;
git lfs pull;
if [[ "${TEST_STATUS}" && "${STAGE}" != "compliance" ]]; then
echo "0" | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6;
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}'| sudo tee /etc/docker/daemon.json;
sudo service docker restart;
fi
install: >
echo -e " \033[1;33mRebuilding Debian Docker Images (with deps)";
travis_wait 30 docker build --no-cache --quiet \
--build-arg TOKEN=${TOKEN} \
--build-arg REV=${TRAVIS_COMMIT} \
--build-arg STAGE=deps -t ${IMAGE_DEPS_DEBIAN} \
-f $(pwd)/docker/Dockerfile-debian $(pwd)/docker/ ;
script: >
echo -e " \033[1;33mRunning Tests against Debian Image";
docker run \
-t --rm -v $(pwd):${HOME} --entrypoint bash \
-e ORIONLD_CACHED_CONTEXT_DIRECTORY=${HOME}/ldcontexts \
-e CB_SKIP_FUNC_TESTS="${CB_SKIP_FUNC_TESTS}" \
-e TRAVIS=${TRAVIS} \
${IMAGE_DEPS_DEBIAN} build.sh -s ${STAGE_TYPE} -dqt;
after_success: true
notifications:
email:
recipients:
on_success: never
on_failure: always
webhooks:
urls:
secure: sLALYcxSpbz7KMZsHyGtNPc+jpVpdps26DljK7sNONOmn0QPxpr1q4y/+cnKzPQO1cN0sTJV15t2OQ46aI4Mo3hJpUGAgbFomELtlH87V+4w+Q+nDJQj9ijR/T5vi2z3PP3u7rh3Y+IjIqJmfo6LfQ6/G9I72GVNkOcQ/3VncjRGTLqd0w5UFVczg2AcHP5C6diohVsjIYA9+r9s0oGrntawfNmXvExn0xvxWkpEKTuICoMDHj2uw2Bl9WMRbgzrWAyPa3dwb9oBB4ATpE11QMthm/zoDfUvoKFRHmmL1eqSiMDE/MfIuRtE9yy0eEtwRMMLjLrDNmtPK+s+oPR+Ofz2WVu8q8AcXXjEw89YfnPpq9ox/MkS5N409OM/hJDhdLcjj1eC45McoKZiw2JUaEoX0lfMsbD+OOIJHSBuHtMyWD4XDZWwzwMTUiRRs3ND8iOTIbs4CXfr5ubTQCqu3Sr2CNH6hL7fGqolvv100Z4vl83gPsPb6yRz8VgDOTK+CR2erYAV89b8M/NC0QJ/6l/qRQShnfli3BiEi5qvvMaFf0mPW+vjAVuqtwjrT+1ytkD0YQAiJXP9Lds2A5u1ONJbOHARzKykx0ecCrSzUE6PZnvsRZkwebnjCsS85/TNYInni/FNo5IdDfK4M65yKiZf8cSm138ZtoYWFuosB5M=
on_success: always
on_failure: never