-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
108 lines (98 loc) · 3.01 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
107
108
---
include:
- project: veepee/vptech/sre/iac/ci-cd/markdown-lint
ref: 1.4.0
file: gitlab-ci.yml
- project: veepee/vptech/sre/iac/ci-cd/semantic-release
ref: 3.11.0
file: gitlab-ci.yml
variables:
SEMANTIC_CONFIG_FILE: changelog
.template: &build
stage: build
image: docker.registry.vptech.eu/vptech/debian:buster
before_script:
- apt-get update -qq -y
- apt-get install -qq -y apt-transport-https ca-certificates curl debootstrap kmod gnupg-agent procps software-properties-common sudo systemd tar
- ln -s /usr/share/debootstrap/scripts/sid /usr/share/debootstrap/scripts/ascii
- ln -s /usr/share/debootstrap/scripts/sid /usr/share/debootstrap/scripts/beowulf
- ln -s /usr/share/debootstrap/scripts/sid /usr/share/debootstrap/scripts/chimaera
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt-get update -qq -y
- apt-get install -qq -y docker-ce docker-ce-cli containerd.io
- env DOCKER_DRIVER=vfs dockerd &
artifacts:
expire_in: 1 day
paths:
- image
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/devuan-v1.0.tar
- docker load -i image/devuan-v2.0.tar
- docker load -i image/devuan-v3.0.tar
- docker load -i image/devuan-v4.0.tar
only:
- master
- main
services:
- name: docker.registry.vptech.eu/docker:dind
alias: docker
tags:
- dind
variables:
DOCKER_DRIVER: overlay
stages:
- lint
- build
- deploy
- release
# build
build:jessie:
<<: *build
script:
- ./build.sh -d jessie -v
- mkdir image
- docker save devuan:jessie > image/devuan-v1.0.tar
build:ascii:
<<: *build
script:
- ./build.sh -d ascii -v
- mkdir image
- docker save devuan:ascii > image/devuan-v2.0.tar
build:beowulf:
<<: *build
script:
- ./build.sh -d beowulf -v
- mkdir image
- docker save devuan:beowulf > image/devuan-v3.0.tar
build:chimaera:
<<: *build
script:
- ./build.sh -d chimaera -v
- mkdir image
- docker save devuan:chimaera > image/devuan-v4.0.tar
# deploy
vptech:
<<: *deploy
script:
- docker tag devuan:jessie vptech/devuan:jessie
- docker tag devuan:jessie vptech/devuan:1
- docker tag devuan:ascii vptech/devuan:ascii
- docker tag devuan:ascii vptech/devuan:2
- docker tag devuan:beowulf vptech/devuan:beowulf
- docker tag devuan:beowulf vptech/devuan:3
- docker tag devuan:beowulf vptech/devuan:oldstable
- docker tag devuan:chimaera vptech/devuan:chimaera
- docker tag devuan:chimaera vptech/devuan:4
- docker tag devuan:chimaera vptech/devuan:stable
- docker tag devuan:chimaera vptech/devuan:latest
- docker push --all-tags vptech/devuan
# EOF