forked from ConductionNL/commonground-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
108 lines (94 loc) · 2.9 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
sudo: required
services:
- docker
branches:
only:
- master
- acceptation
- staging
- testing
- development
addons:
apt:
packages:
- docker-ce
before_install:
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash -s -- --version v2.9.0
install: true
before_script:
- sudo service postgresql stop
# wait for postgresql to shutdown
- while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done
script:
# Doing branchs stuff
# - if [ "$TRAVIS_BRANCH" = "master" ]; then env: APP_ENV=prod ; fi
# - if [ "$TRAVIS_BRANCH" = "acceptation" ]; then env: APP_ENV=acce ; fi
# - if [ "$TRAVIS_BRANCH" = "staging" ]; then env: APP_ENV=stag ; fi
# - if [ "$TRAVIS_BRANCH" = "testing" ]; then env: APP_ENV=test ; fi
# - if [ "$TRAVIS_BRANCH" = "development" ]; then env: APP_ENV=dev ; fi
# - if jq '.extra.symfony.id != null' api/composer.json -e > /dev/null; then echo 'composer.json must not have symfony.id' 1>&2 fi
- docker-compose pull --ignore-pull-failures
- docker-compose build --pull --build-arg APP_ENV=$APP_ENV
- docker-compose up -d
- sleep 30
# @todo The following lines currently stop the build from passing, that is an issue that needs to be fixed
# - docker-compose exec -T php bin/console security:check
# - curl -f http://localhost # Client
# - curl -f http://admin.localhost # Admin
# - curl -f http://api.localhost # API
# - curl -f http://stag.localhost # API
# - curl -f http://dev.localhost # API
# - curl -fk https://localhost # Client (HTTP/2)
# - curl -fk https://localhost:444 # Admin (HTTP/2)
# - curl -fk https://localhost:8443 # API (HTTP/2)
# - curl -fk https://localhost:8444 # Varnish (HTTP/2)
# - helm lint ./api/helm/api/
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin "$DOCKER_REGISTRY"
deploy:
- provider: script
script:
- docker-compose push
skip_cleanup: true
on:
branch: master
- provider: script
script:
- docker-compose push
skip_cleanup: true
on:
branch: development
- provider: script
script:
- docker-compose push
skip_cleanup: true
on:
branch: testing
- provider: script
script:
- docker-compose push
skip_cleanup: true
on:
branch: acceptation
- provider: script
script:
- docker-compose push
skip_cleanup: true
on:
branch: staging
# kubectl rollout restart
# we also want to warn the common-ground dev page that a change has been made
#deploy:
# provider: script
# script: docker-compose push test-pc-php
# skip_cleanup: true
# on:
# repo: ConductionNL/Proto-component-commonground
# branch: testing
#deploy:
# provider: script
# script: docker-compose push dev-pc-php
# skip_cleanup: true
# on:
# repo: ConductionNL/Proto-component-commonground
# branch: development