-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
61 lines (53 loc) · 1.21 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
include:
- project: 10up-build/ci-library
ref: trunk
file: /main.yml
.build:
extends: .kubernetes_build_docker_image
tags:
- kubernetes
script:
- cd ${BASE:?}
- export DOCKER_TAG=${PHP_VERSION}
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --pull --network host --build-arg PHP_VERSION=$PHP_VERSION --tag $CI_REGISTRY_IMAGE:${DOCKER_TAG} --tag $CI_REGISTRY_IMAGE:${DOCKER_TAG}-${CI_COMMIT_SHORT_SHA} .
- docker push $CI_REGISTRY_IMAGE:${DOCKER_TAG}
- docker push $CI_REGISTRY_IMAGE:${DOCKER_TAG}-${CI_COMMIT_SHORT_SHA}
when: on_success
only:
- trunk
PHP 5.6:
variables:
PHP_VERSION: '5.6'
BASE: 'centos7'
extends: .build
PHP 7.0:
variables:
PHP_VERSION: '7.0'
BASE: 'centos7'
extends: .build
PHP 7.1:
variables:
PHP_VERSION: '7.1'
BASE: 'centos7'
extends: .build
PHP 7.2:
variables:
PHP_VERSION: '7.2'
BASE: 'centos8'
extends: .build
PHP 7.3:
variables:
PHP_VERSION: '7.3'
BASE: 'centos8'
extends: .build
PHP 7.4:
variables:
PHP_VERSION: '7.4'
BASE: 'centos8'
extends: .build
PHP 8.0:
variables:
PHP_VERSION: '8.0'
BASE: 'centos8'
extends: .build