forked from willhallonline/docker-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
49 lines (43 loc) · 2.29 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
# This file is a template, and might need editing before it works on your project.
# Official docker image.
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
build-alpine:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-alpine-3.11" ansible28/alpine311/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-alpine-3.11" ansible29/alpine311/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-alpine-3.10" ansible28/alpine310/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-alpine-3.10" ansible29/alpine310/
- docker push "$CI_REGISTRY_IMAGE"
build-ubuntu:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-ubuntu-16.04" ansible28/ubuntu1604/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-ubuntu-18.04" ansible28/ubuntu1804/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-ubuntu-20.04" ansible28/ubuntu2004/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-ubuntu-16.04" ansible29/ubuntu1604/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-ubuntu-18.04" ansible29/ubuntu1804/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-ubuntu-20.04" ansible29/ubuntu2004/
- docker push "$CI_REGISTRY_IMAGE"
build-centos:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-centos-7" ansible28/centos7/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-centos-7" ansible29/centos7/
- docker push "$CI_REGISTRY_IMAGE"
build-debian:
stage: build
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-stretch" ansible28/debian-stretch/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-stretch" ansible29/debian-stretch/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-stretch-slim" ansible28/debian-stretch-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-stretch-slim" ansible29/debian-stretch-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-buster" ansible28/debian-buster/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-buster" ansible29/debian-buster/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.8-buster-slim" ansible28/debian-buster-slim/
- docker build --pull -t "$CI_REGISTRY_IMAGE:2.9-buster-slim" ansible29/debian-buster-slim/
- docker push "$CI_REGISTRY_IMAGE"