-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
106 lines (95 loc) · 2.33 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
99
100
101
102
103
104
105
106
---
include:
- project: veepee/vptech/sre/iac/ci-cd/markdown-lint
ref: latest
file: gitlab-ci.yml
- project: veepee/vptech/sre/iac/ci-cd/semantic-release
ref: latest
file: gitlab-ci.yml
- project: veepee/vptech/sre/iac/ci-cd/shellcheck
ref: latest
file: gitlab-ci.yml
variables:
SEMANTIC_CONFIG_FILE: changelog
.template: &build
stage: build
image: docker.registry.vptech.eu/docker:latest
before_script:
- apk update && apk add bash curl
artifacts:
expire_in: 1 day
paths:
- image
services:
- name: docker.registry.vptech.eu/docker:dind
alias: docker
tags:
- dind
variables:
DOCKER_DRIVER: overlay
.template: &deploy
stage: deploy
image: docker.registry.vptech.eu/docker:latest
before_script:
- docker login -u "$DOCKER_PUBLIC_REGISTRY_USERNAME" -p "$DOCKER_PUBLIC_REGISTRY_PASSWORD"
- docker load -i image/alpine-v3.11.tar
- docker load -i image/alpine-v3.12.tar
- docker load -i image/alpine-v3.13.tar
- docker load -i image/alpine-v3.14.tar
- docker load -i image/alpine-v3.15.tar
only:
- master
services:
- name: docker.registry.vptech.eu/docker:dind
alias: docker
tags:
- dind
variables:
DOCKER_DRIVER: overlay
stages:
- lint
- build
- deploy
- release
build:3.11:
<<: *build
script:
- ./build.sh -d 3.11
- mkdir image
- docker save alpine:3.11 > image/alpine-v3.11.tar
build:3.12:
<<: *build
script:
- ./build.sh -d 3.12
- mkdir image
- docker save alpine:3.12 > image/alpine-v3.12.tar
build:3.13:
<<: *build
script:
- ./build.sh -d 3.13
- mkdir image
- docker save alpine:3.13 > image/alpine-v3.13.tar
build:3.14:
<<: *build
script:
- ./build.sh -d 3.14
- mkdir image
- docker save alpine:3.14 > image/alpine-v3.14.tar
build:3.15:
<<: *build
script:
- ./build.sh -d 3.15
- mkdir image
- docker save alpine:3.15 > image/alpine-v3.15.tar
# https://hub.docker.com/u/vptech/
vptech:
<<: *deploy
script:
- docker tag alpine:3.11 vptech/alpine:3.11
- docker tag alpine:3.12 vptech/alpine:3.12
- docker tag alpine:3.13 vptech/alpine:3.13
- docker tag alpine:3.14 vptech/alpine:3.14
- docker tag alpine:3.15 vptech/alpine:3.15
- docker tag alpine:3.15 vptech/alpine:latest
- docker push --all-tags vptech/alpine
# EOF