forked from sw360/sw360chores
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
55 lines (52 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
48
49
50
51
52
53
54
# -----------------------------------------------------------------------------
# Copyright Siemens AG, 2017.
# Copyright Bosch Software Innovations GmbH, 2017.
# Part of the SW360 Portal Project.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
# -----------------------------------------------------------------------------
dist: trusty
sudo: required
addons:
apt:
packages:
- docker-ce
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.23.2
before_install:
- set -e
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
jobs:
include:
- name: docker compose test
install:
- set -e
- ./sw360chores.pl --build -- up -d
- sleep 240
script: .travis/testDockerComposeDeployment.sh
after_failure:
- ./sw360chores.pl -- logs --tail=500
- name: docker swarm test
install:
- set -e
- docker swarm init
- docker version
- docker info
- ./sw360chores.pl --swarm --build
- docker tag sw360/sw360empty sw360/sw360populated # emulate the build prod docker images
- docker stack deploy --compose-file <(./sw360chores.pl --prod --swarm -- config) sw360
- sleep 240
- docker service ls
- docker stack ps sw360
script: .travis/testDockerSwarmDeployment.sh
after_script:
- set -ex
- docker service ls
- docker stack ps sw360