forked from alterway/docker-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
98 lines (71 loc) · 1.93 KB
/
.gitlab-ci.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
stages:
- build
.build_push_template: &build_push_definition
stage: build
only:
- preprod
- master
script:
- docker build --pull -t $REGISTRY/php:$CI_JOB_NAME $CI_JOB_NAME/ >> /dev/null
- docker push $REGISTRY/php:$CI_JOB_NAME > /dev/null
- docker tag $REGISTRY/php:$CI_JOB_NAME $NAMESPACE/php:$CI_JOB_NAME > /dev/null
- docker push $NAMESPACE/php:$CI_JOB_NAME > /dev/null
- |
if [[ "$CI_BUILD_REF_NAME" = "master" ]]; then
docker tag $REGISTRY/php:$CI_JOB_NAME $CI_REGISTRY_IMAGE:$CI_JOB_NAME > /dev/null
docker push $CI_REGISTRY_IMAGE:$CI_JOB_NAME > /dev/null
fi
before_script:
- if [[ "$CI_BUILD_REF_NAME" != master ]]; then REGISTRY="$REGISTRY/$CI_BUILD_REF_NAME"; fi
- if [[ "$CI_BUILD_REF_NAME" = "master" ]]; then docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY; fi
- NAMESPACE=$REGISTRY/library
7.4-fpm:
<<: *build_push_definition
7.4-apache:
<<: *build_push_definition
7.4-cli:
<<: *build_push_definition
7.3-fpm-posix-stretch:
<<: *build_push_definition
7.3-fpm-stretch:
<<: *build_push_definition
7.3-apache-stretch:
<<: *build_push_definition
7.3-cli-stretch:
<<: *build_push_definition
7.3-fpm-posix:
<<: *build_push_definition
7.3-fpm:
<<: *build_push_definition
7.3-apache:
<<: *build_push_definition
7.3-cli:
<<: *build_push_definition
7.2-fpm:
<<: *build_push_definition
7.2-apache:
<<: *build_push_definition
7.2-cli:
<<: *build_push_definition
7.1-cli-alpine:
<<: *build_push_definition
7.1-fpm-alpine:
<<: *build_push_definition
7.1-fpm:
<<: *build_push_definition
7.1-apache:
<<: *build_push_definition
7.1-cli:
<<: *build_push_definition
7.0-fpm:
<<: *build_push_definition
7.0-apache:
<<: *build_push_definition
7.0-cli:
<<: *build_push_definition
5.6-fpm:
<<: *build_push_definition
5.6-apache:
<<: *build_push_definition
5.6-cli:
<<: *build_push_definition