forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
178 lines (171 loc) · 5.58 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
stages:
- init
- rpmbuild
- test
- finish
.terraform:
before_script:
- schutzbot/ci_details.sh > ci-details-before-run
- cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
after_script:
- schutzbot/ci_details.sh > ci-details-after-run
- schutzbot/unregister.sh
tags:
- terraform
artifacts:
paths:
- ci-details-before-run
- ci-details-after-run
init:
stage: init
tags:
- shell
script:
- schutzbot/update_github_status.sh start
interruptible: true
RPM:
stage: rpmbuild
extends: .terraform
script:
- sh "schutzbot/mockbuild.sh"
interruptible: true
parallel:
matrix:
- RUNNER:
- aws/fedora-39-x86_64
- aws/fedora-39-aarch64
- aws/fedora-40-x86_64
- aws/fedora-40-aarch64
- aws/fedora-41-x86_64
- aws/fedora-41-aarch64
- aws/centos-stream-9-x86_64
- aws/centos-stream-9-aarch64
- aws/centos-stream-10-x86_64
- aws/centos-stream-10-aarch64
- aws/rhel-8.10-ga-x86_64
- aws/rhel-8.10-ga-aarch64
- aws/rhel-9.4-ga-x86_64
- aws/rhel-9.4-ga-aarch64
- RUNNER:
- aws/rhel-9.6-nightly-x86_64
- aws/rhel-9.6-nightly-aarch64
- aws/rhel-9.7-nightly-x86_64
- aws/rhel-9.7-nightly-aarch64
- aws/rhel-10.0-nightly-x86_64
- aws/rhel-10.0-nightly-aarch64
- aws/rhel-10.1-nightly-x86_64
- aws/rhel-10.1-nightly-aarch64
INTERNAL_NETWORK: "true"
OSTree Images:
stage: test
extends: .terraform
script:
- schutzbot/deploy.sh
- sudo test/cases/ostree-images --manifest "$MANIFEST" --export $EXPORT
variables:
RUNNER: aws/fedora-41-x86_64
parallel:
matrix:
- MANIFEST: fedora-ostree-tarball.json
EXPORT: tarball/fedora-commit.tar
- MANIFEST: fedora-ostree-container.json
EXPORT: container/fedora-container.tar
- MANIFEST: fedora-ostree-native-container.json
EXPORT: container/ostree-container.tar
- MANIFEST: fedora-ostree-bootiso.json
EXPORT: bootiso/fedora-ostree-boot.iso
- MANIFEST: fedora-ostree-bootiso-xz.json
EXPORT: bootiso/fedora-ostree-boot.iso
- MANIFEST: fedora-ostree-image.json
EXPORT: qcow2/disk.qcow2
- MANIFEST: fedora-coreos-container.json
EXPORT: qemu/qemu.qcow2 metal/metal.raw metal4k/metal4k.raw
- MANIFEST: fedora-ostree-container-dev-null.json
EXPORT: commit-archive/ostree-commit.tar
Manifests:
stage: test
extends: .terraform
script:
- schutzbot/deploy.sh
- schutzbot/manifest-tests-install-deps.sh
- IMAGES_REPO_REF=$(jq -r '.global.dependencies.images.ref' Schutzfile)
- |
if [[ -n "$CHUNKS_COUNT" && -n "$CHUNK" ]]; then
echo "Running manifest tests with $CHUNKS_COUNT chunks, chunk $CHUNK"
SCRIPT_EXTRA_ARGS="--chunk-size $CHUNK $CHUNKS_COUNT"
fi
if [[ -n "$UNSUPPORTED_IMG_TYPES" ]]; then
echo "Skipping unsupported image types: $UNSUPPORTED_IMG_TYPES"
SCRIPT_EXTRA_ARGS="$SCRIPT_EXTRA_ARGS --skip-image-type $UNSUPPORTED_IMG_TYPES"
fi
if [[ -n "$CONFIG" ]]; then
echo "Testing only the following manifest generation configs: $CONFIG"
SCRIPT_EXTRA_ARGS="$SCRIPT_EXTRA_ARGS --config $CONFIG"
fi
if [[ -n "$IMAGES_REPO_REF" ]]; then
echo "Using osbuild/images repo ref: $IMAGES_REPO_REF"
SCRIPT_EXTRA_ARGS="$SCRIPT_EXTRA_ARGS --images-ref $IMAGES_REPO_REF"
fi
if [[ -n "$SCRIPT_EXTRA_ARGS" ]]; then
echo "Running manifest tests with extra args: $SCRIPT_EXTRA_ARGS"
fi
- |
source /etc/os-release
if [[ "$ID" == "rhel" || "$ID" == "centos" ]]; then
export GOFLAGS="-tags=exclude_graphdriver_btrfs"
fi
- test/cases/manifest_tests --rm-artifacts-after-test --workdir ./osbuild-manifest-tests-workdir $SCRIPT_EXTRA_ARGS
variables:
PYTHONUNBUFFERED: 1
# List of image types that are not supported by osbuild-image-info
UNSUPPORTED_IMG_TYPES: "ova *container live-installer wsl"
artifacts:
when: always
paths:
- ci-details-before-run
- ci-details-after-run
- ./osbuild-manifest-tests-results/
parallel:
matrix:
- RUNNER:
- aws/fedora-41-x86_64
- aws/fedora-41-aarch64
- aws/centos-stream-9-x86_64
- aws/centos-stream-9-aarch64
- aws/centos-stream-10-x86_64
- aws/centos-stream-10-aarch64
# Test only the following manifest generation configs
CONFIG: "empty all-customizations"
CHUNK: [1, 2, 3, 4, 5]
CHUNKS_COUNT: 5
- RUNNER:
- aws/rhel-9.4-ga-x86_64
- aws/rhel-9.4-ga-aarch64
- aws/rhel-9.6-nightly-x86_64
- aws/rhel-9.6-nightly-aarch64
- aws/rhel-9.7-nightly-x86_64
- aws/rhel-9.7-nightly-aarch64
- aws/rhel-10.0-nightly-x86_64
- aws/rhel-10.0-nightly-aarch64
- aws/rhel-10.1-nightly-x86_64
- aws/rhel-10.1-nightly-aarch64
INTERNAL_NETWORK: "true"
# Test only the following manifest generation configs
CONFIG: "empty all-customizations"
CHUNK: [1, 2, 3, 4, 5]
CHUNKS_COUNT: 5
finish:
stage: finish
tags:
- shell
script:
- schutzbot/update_github_status.sh finish
fail:
stage: finish
tags:
- shell
script:
- schutzbot/update_github_status.sh fail
- exit 1 # make the pipeline fail so it doesn't look like success in gitlab
when:
on_failure