-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
124 lines (116 loc) · 3.19 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
stages:
- images
- publish
variables:
FISHDEPS: "/usr/bin/guestfish /usr/bin/virt-sysprep /usr/bin/virt-sparsify xz sudo jq"
KICKDEPS: "/usr/bin/virt-install"
.store_images: &store_images
- export LIBGUESTFS_BACKEND=direct
- mkdir $CI_JOB_NAME
- for image in *.qcow2;
do
test -f "$image" || continue;
scripts/virt-builder-prepare.sh "$image";
mv --verbose ${image%.qcow2}* $CI_JOB_NAME;
done
- for tar in *.tar;
do
test -f "$tar" || continue;
xz --verbose "$tar";
mv --verbose ${tar}* $CI_JOB_NAME;
done
- name="$CI_JOB_NAME images"
- base="$CI_JOB_URL/artifacts/raw/$CI_JOB_NAME"
- tree -i -f -s -h -D --charset utf8 -T "$name" -H "$base" $CI_JOB_NAME > index.html
- mv --verbose index.html $CI_JOB_NAME
- ls -l -h $CI_JOB_NAME
el7:
stage: images
image: registry.gitlab.com/kraxel/rpm-package-builder:el7
before_script:
- time yum install -y $FISHDEPS
script:
- sed -i -e '/proxy/d' repos/centos-7.repo
- time ./CentOS7-efi.sh
- *store_images
artifacts:
paths:
- el7
el8:
stage: images
image: registry.gitlab.com/kraxel/rpm-package-builder:el8
when: manual
before_script:
- time dnf install -y $FISHDEPS
script:
- sed -i -e '/proxy/d' repos/centos-8-stream.repo
- time ./CentOS8-efi.sh
- *store_images
artifacts:
paths:
- el8
fedora:
stage: images
image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
when: manual
before_script:
- time dnf install -y $FISHDEPS
script:
- time ./Fedora-efi-grub2.sh
- time ./Fedora-efi-systemd.sh
- rm -f *.tar.gz
- *store_images
artifacts:
paths:
- fedora
fedora_kickstart:
stage: images
image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
when: manual
before_script:
- time dnf install -y $FISHDEPS $KICKDEPS
script:
- sudo /usr/sbin/libvirtd --daemon --listen
- time ./kickstart/run-install.sh
fedora-34-ks-x86_64.qcow2
https://download.fedoraproject.org/pub/fedora/linux/releases/34/Server/x86_64/os/
kickstart/fedora.ks
- *store_images
artifacts:
paths:
- fedora_kickstart
wsl:
stage: images
image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
script:
- sed -i -e '/proxy/d' repos/centos-8-stream.repo
- dnf install -y which
- time ./Fedora-wsl.sh
- time ./CentOS8-wsl.sh
- *store_images
artifacts:
paths:
- wsl
pages:
stage: publish
image: registry.gitlab.com/kraxel/rpm-package-builder:fedora
dependencies:
- el7
# - el8
# - fedora
- wsl
script:
- mkdir public
- for d in el7 wsl; do mv -v ${d}/index.html public/${d}.html; done
- cat pages/header.html > listing.html
- cat pages/efi.html >> listing.html
- cat public/*.html | grep "href.*qcow2.xz" >> listing.html
- cat pages/wsl.html >> listing.html
- cat public/*.html | grep "href.*tar.xz" >> listing.html
- cat pages/footer.html >> listing.html
- mv -v listing.html public/index.html
- tree --charset utf8 -T "images" -H . public > tree.html
- mv -v tree.html public
artifacts:
paths:
- public/