-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (39 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
image: docker
before_script:
- docker login registry.roqua.nl -u "$REGISTRY_USERNAME" -p "$REGISTRY_PASSWORD"
.test_build: &test_build
retry: 2
script:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- docker build --pull -f "Dockerfile.$1" .
except:
- master
.build_and_deploy: &build_and_deploy
retry: 2
script:
- docker build --pull --no-cache -t "registry.roqua.nl/$CI_PROJECT_PATH:$CI_JOB_NAME" -f "Dockerfile.$CI_JOB_NAME" .
- docker push "registry.roqua.nl/$CI_PROJECT_PATH:$CI_JOB_NAME"
only:
- master
ruby-2.7-builder test: *test_build
ruby-2.7 test: *test_build
ruby-3.0-builder test: *test_build
ruby-3.0 test: *test_build
ruby-3.1-builder test: *test_build
ruby-3.1 test: *test_build
ruby-3.2-builder test: *test_build
ruby-3.2 test: *test_build
ruby-3.3-builder test: *test_build
ruby-3.3 test: *test_build
ruby-2.7-builder: *build_and_deploy
ruby-2.7: *build_and_deploy
ruby-3.0-builder: *build_and_deploy
ruby-3.0: *build_and_deploy
ruby-3.1-builder: *build_and_deploy
ruby-3.1: *build_and_deploy
ruby-3.2-builder: *build_and_deploy
ruby-3.2: *build_and_deploy
ruby-3.3-builder: *build_and_deploy
ruby-3.3: *build_and_deploy