-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
100 lines (85 loc) · 2.5 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
os: linux
language: shell
services:
- docker
addons:
apt:
packages:
- docker-ce
git:
depth: false
quiet: true
env:
global:
- DOCKER_COMPOSE_VERSION=1.24.1
- BUILD_NPROC=8
- BUILD_PERLPROC=20
- COMPOSE_ENV=test
- COMPOSE_ENV_PHP_VERSION=7.3
- COMPOSE_HTTP_TIMEOUT=120
- COMPOSE_INTERACTIVE_NO_CLI=1
- DOCKER_WEB_HOSTNAME=infocmdb.local
- IMAGE_TAG=ci
- REGISTRY_TARGET=infonova
before_install:
- git fetch --all --tags
- echo "install specific docker-compose Version '${DOCKER_COMPOSE_VERSION}'."
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker version
- docker-compose version
- export APP_WWW_DATA_USERID=$(id -u)
- git describe --tags --long --always > version_info.txt
- echo -n "Cmdb Version "
- cat version_info.txt
before_script:
- set -e
- ./run setup
- ./run build --parallel
script:
- ./run up
- ./run execute_tests unit --steps
- ./run execute_tests api --steps
- ./run execute_tests apiV2 --steps
- travis_retry ./run execute_tests functional --steps
- travis_retry ./run execute_tests acceptance --steps
after_script:
- docker-compose logs
- docker images
branches:
only:
- develop
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
jobs:
fast_finish: true
allow_failures:
- env: COMPOSE_ENV_PHP_VERSION=7
include:
- stage: "testing"
name: "PHP 7.1 Version"
env: COMPOSE_ENV_PHP_VERSION=7.1
- name: "PHP 7.3 Version"
env: COMPOSE_ENV_PHP_VERSION=7.3
- name: "PHP 7 latest Version versus develop"
env: COMPOSE_ENV_PHP_VERSION=7
if: branch = develop AND TRAVIS_EVENT_TYPE = cron
- stage: "publishing"
name: "publish release images"
if: branch =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND type != pull_request
env:
- COMPOSE_ENV=prod
- IMAGE_TAG=release
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- bash deploy/publish_docker_images.sh ${IMAGE_TAG} ${REGISTRY_TARGET}
- name: "publish nightly image"
if: branch = develop AND ( type = cron || type = api )
env:
- COMPOSE_ENV=prod
- IMAGE_TAG=nightly
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker-compose push
# vim:set et ts=2 sw=2: