forked from docksal/service-vhost-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (49 loc) · 1.56 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
sudo: required
language: generic
env:
REPO: docksal/vhost-proxy
IMAGE_VHOST_PROXY: ${REPO}:dev
DOCKSAL_VHOST_PROXY_ACCESS_LOG: 1
DOCKSAL_VHOST_PROXY_DEBUG_LOG: 1
DOCKSAL_VHOST_PROXY_STATS_LOG: 1
# Only use seconds here, so that these can be used with "sleep" as well
PROJECT_INACTIVITY_TIMEOUT: 30s
PROJECT_DANGLING_TIMEOUT: 60s
PROJECTS_ROOT: ${TRAVIS_BUILD_DIR}/projects
DOCKSAL_VERSION: develop
services:
- docker
install:
- sudo sudo curl -L https://raw.githubusercontent.com/docksal/docksal/${DOCKSAL_VERSION}/bin/fin -o /usr/local/bin/fin && sudo chmod +x /usr/local/bin/fin
- fin version
- fin update
- fin sysinfo
before_script:
# Pull curl image with http2 support (used in tests)
- docker pull badouralix/curl-http2
- .travis/before_script.sh
- ls -la "$PROJECTS_ROOT"
- fin pl -a
- ls -la ~/.docksal/certs/
script:
- make
- make start
- make exec -e CMD="env" # Views env variables picked up by proxy
- make exec -e CMD="ls -la /projects" # View the contents of the /projects folder
- make test
after_success: |
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
# develop => edge
[[ "${TRAVIS_BRANCH}" == "develop" ]] && TAG="edge"
# master => latest
[[ "${TRAVIS_BRANCH}" == "master" ]] && TAG="latest"
# tags/v1.2.0 => 1.2
[[ "${TRAVIS_TAG}" != "" ]] && TAG="${TRAVIS_TAG:1:3}"
if [[ "$TAG" != "" ]]; then
docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}"
docker tag ${IMAGE_VHOST_PROXY} ${REPO}:${TAG}
docker push ${REPO}:${TAG}
fi
fi
after_failure:
- make logs