forked from box/Anemometer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (68 loc) · 2.96 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
dist: focal
os: linux
language: shell
stages:
- test
- build
services: docker
# Setup jobs
jobs:
include:
# alpine
- stage: test
script:
- docker build -t "anemometer-fpm-tests:current-alpine" --build-arg "PREPARE_TESTS=true" -f docker/fpm/Dockerfile_alpine .
- docker run "anemometer-fpm-tests:current-alpine" /var/www/html/vendor/phpunit/phpunit/phpunit
# debian
- script:
- docker build -t "anemometer-fpm-tests:current" --build-arg "PREPARE_TESTS=true" -f docker/fpm/Dockerfile_debian .
- docker run "anemometer-fpm-tests:current" /var/www/html/vendor/phpunit/phpunit/phpunit
- stage: build
# anemometer-fpm:alpine
script:
- docker build -t "anemometer/anemometer-fpm:${TRAVIS_TAG}-alpine" -f docker/fpm/Dockerfile_alpine .
- docker tag "anemometer/anemometer-fpm:${TRAVIS_TAG}-alpine" "anemometer/anemometer-fpm:latest-alpine"
if: tag IS present
before_deploy:
- echo "${DOCKERHUB_TOKEN}" | docker login -u="${DOCKERHUB_USER}" --password-stdin;
deploy:
provider: script
script: docker push "anemometer/anemometer-fpm:${TRAVIS_TAG}-alpine" && docker push "anemometer/anemometer-fpm:latest-alpine"
on:
tags: true
# anemometer-fpm:debian
- script:
- docker build -t "anemometer/anemometer-fpm:${TRAVIS_TAG}" -f docker/fpm/Dockerfile_debian .
- docker tag "anemometer/anemometer-fpm:${TRAVIS_TAG}" "anemometer/anemometer-fpm:latest"
if: tag IS present
before_deploy:
- echo "${DOCKERHUB_TOKEN}" | docker login -u="${DOCKERHUB_USER}" --password-stdin;
deploy:
provider: script
script: docker push "anemometer/anemometer-fpm:${TRAVIS_TAG}" && docker push "anemometer/anemometer-fpm:latest"
on:
tags: true
# anemometer-nginx:alpine
- script:
- docker build -t "anemometer/anemometer-nginx:${TRAVIS_TAG}-alpine" -f docker/nginx/Dockerfile_alpine .
- docker tag "anemometer/anemometer-nginx:${TRAVIS_TAG}-alpine" "anemometer/anemometer-nginx:latest-alpine"
if: tag IS present
before_deploy:
- echo "${DOCKERHUB_TOKEN}" | docker login -u="${DOCKERHUB_USER}" --password-stdin;
deploy:
provider: script
script: docker push "anemometer/anemometer-nginx:${TRAVIS_TAG}-alpine" && docker push "anemometer/anemometer-nginx:latest-alpine"
on:
tags: true
# anemometer-nginx:debian
- script:
- docker build -t "anemometer/anemometer-nginx:${TRAVIS_TAG}" -f docker/nginx/Dockerfile_alpine .
- docker tag "anemometer/anemometer-nginx:${TRAVIS_TAG}" "anemometer/anemometer-nginx:latest"
if: tag IS present
before_deploy:
- echo "${DOCKERHUB_TOKEN}" | docker login -u="${DOCKERHUB_USER}" --password-stdin;
deploy:
provider: script
script: docker push "anemometer/anemometer-nginx:${TRAVIS_TAG}" && docker push "anemometer/anemometer-nginx:latest"
on:
tags: true