-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
316 lines (293 loc) · 11.6 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
316 lines (293 loc) · 11.6 KB
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE == "true"
include:
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: curl
prerequisites: jq
command: |
curl -sSf https://api.github.com/repos/curl/curl/releases \
| jq --raw-output '.[].tag_name' \
| cut -d- -f2- \
| tr '_' '.' \
| head -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: davfs2
prerequisites: jq
command: |
curl -sSf https://api.github.com/repos/alisarctl/davfs2/releases \
| jq --raw-output '.[].tag_name' \
| cut -d- -f2- \
| tr '-' '.' \
| head -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: docker-desktop
prerequisites: xq
command: |
curl -sSf https://desktop.docker.com/linux/main/amd64/appcast.xml \
| xq --json \
| jq --raw-output '.rss.channel.item[].enclosure | "\(."@shortVersionString").\(."@version")"' \
| sort -n -r \
| head -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: docker-init
needs:
- docker-desktop-release
command: |
DD_VERSION="$(
curl -sSfH "Job-Token: ${CI_JOB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases?per_page=100" \
| jq -r '.[].tag_name' \
| grep ^docker-desktop/ \
| head -n 1 \
| cut -d/ -f2
)"
curl -sLf https://gitlab.com/uniget-org/cli/-/releases/permalink/latest/downloads/uniget_Linux_$(uname -m).tar.gz \
| tar -xzC /usr/local/bin uniget >&2
uniget --prefix=helper install docker-init >&2
docker_desktop_version="${DD_VERSION}" bash -x -e ./helper/usr/local/bin/install-docker-init.sh . >&2
VERSION="$(
./libexec/docker/cli-plugins/docker-init init --version \
| grep ^Version \
| cut -dv -f2
)"
if test -z "${VERSION}"; then
echo "Unable to get version" >&2
exit 1
fi
echo "${VERSION}-${DD_VERSION}"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: docker-debug
needs:
- docker-desktop-release
command: |
DD_VERSION="$(
curl -sSfH "Job-Token: ${CI_JOB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases?per_page=100" \
| jq -r '.[].tag_name' \
| grep ^docker-desktop/ \
| head -n 1 \
| cut -d/ -f2
)"
curl -sLf https://gitlab.com/uniget-org/cli/-/releases/permalink/latest/downloads/uniget_Linux_$(uname -m).tar.gz \
| tar -xzC /usr/local/bin uniget >&2
uniget --prefix=helper install docker-debug >&2
docker_desktop_version="${DD_VERSION}" bash -x -e ./helper/usr/local/bin/install-docker-debug.sh . >&2
VERSION="$(
./libexec/docker/cli-plugins/docker-debug debug --version \
| grep ^Version \
| cut -d' ' -f2
)"
if test -z "${VERSION}"; then
echo "Unable to get version" >&2
exit 1
fi
echo "${VERSION}-${DD_VERSION}"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: docker-ai
needs:
- docker-desktop-release
command: |
DD_VERSION="$(
curl -sSfH "Job-Token: ${CI_JOB_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases?per_page=100" \
| jq -r '.[].tag_name' \
| grep ^docker-desktop/ \
| head -n 1 \
| cut -d/ -f2
)"
curl -sLf https://gitlab.com/uniget-org/cli/-/releases/permalink/latest/downloads/uniget_Linux_$(uname -m).tar.gz \
| tar -xzC /usr/local/bin uniget >&2
uniget --prefix=helper install docker-ai >&2
docker_desktop_version="${DD_VERSION}" bash -x -e ./helper/usr/local/bin/install-docker-ai.sh . >&2
VERSION="$(
./libexec/docker/cli-plugins/docker-ai ai version \
| tr -d v
)"
if test -z "${VERSION}"; then
echo "Unable to get version" >&2
exit 1
fi
echo "${VERSION}-${DD_VERSION}"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: floodgate
command: |
curl -sSLf https://download.geysermc.org/v2/projects/floodgate \
| jq --raw-output '.versions[-1]' \
| xargs -I{} \
curl -sSLf https://download.geysermc.org/v2/projects/floodgate/versions/{}/builds \
| jq --raw-output '"\(.version).\(.builds | map(select(.channel == "default")) | .[-1].build)"'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: geyser
command: |
curl -sSLf https://download.geysermc.org/v2/projects/geyser \
| jq --raw-output '.versions[-1]' \
| xargs -I{} \
curl -sSLf https://download.geysermc.org/v2/projects/geyser/versions/{}/builds \
| jq --raw-output '"\(.version).\(.builds | map(select(.channel == "default")) | .[-1].build)"'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: k3s
command: |
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/k3s-io/k3s/releases/latest" \
| jq --raw-output '.tag_name' \
| sed -E 's/^v([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)\\+k3s([[:digit:]]+)$/\\1.\\2/'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: namespace
command: |
curl --silent --show-error --location --fail https://github.com/namespacelabs/homebrew-namespace/raw/main/nsc.rb \
| grep version \
| cut -d'"' -f2
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: libgmp
prerequisites: libxml2-utils
command: |
curl -sSLf https://ftp.gnu.org/gnu/gmp/ \
| xmllint -html --xpath "//a/@href" - \
| cut -d= -f2 \
| tr -d '"' \
| grep '.xz$' \
| sed -E 's/^gmp-(.+)\\.tar\\.xz$/\\1/' \
| sort -Vr \
| head -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: luckperms
command: |
LUCKPERMS_BUILD="$(
curl --silent --show-error --location --fail "https://ci.lucko.me/job/LuckPerms/api/json?pretty=true" \
| jq --raw-output '.builds[0].number'
)"
LUCKPERMS_VERSION="$(
curl -sSLf "https://ci.lucko.me/job/LuckPerms/${LUCKPERMS_BUILD}/api/json?pretty=true" \
| jq -r '.artifacts[] | select(.relativePath | contains("bukkit/")) | select(.relativePath | contains("-Bukkit-")) | .relativePath' \
| cut -d/ -f5 \
| cut -d- -f3 \
| cut -d. -f1-3
)"
echo "${LUCKPERMS_VERSION}-${LUCKPERMS_BUILD}"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: minecraft-server
command: |
curl -sSLf https://launchermeta.mojang.com/mc/game/version_manifest.json \
| jq --raw-output '.latest.release'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: nodejs-lts
command: |
curl --silent --location --fail https://github.com/nodejs/Release/raw/main/schedule.json \
| jq -r 'to_entries[] | select(.value.maintenance > (now | todate)) | select(.value.lts != null) | select(.value.lts < (now | todate)) | .key' \
| xargs -I{} \
git ls-remote https://github.com/nodejs/node "refs/tags/{}.*" \
| grep -v '\\^{}' \
| cut -f2 | cut -d/ -f3 | tr -d v \
| sort -Vr | head -1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: openjdk
command: |
curl --silent --show-error --location --fail \
--url "https://api.adoptium.net/v3/info/available_releases" \
| jq --raw-output '.available_releases | max' \
| xargs -I{} \
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/adoptium/temurin{}-binaries/releases/latest" \
| jq --raw-output '.tag_name' \
| sed 's/^jdk-//' \
| sed -E 's/^([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)\\+([[:digit:]]+)$/\\1-\\2/'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: passage
command: |
git clone --quiet https://github.com/FiloSottile/passage
echo "$(git -C passage rev-list --count --all).$(git -C passage rev-parse --short HEAD)"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: papermc
command: |
curl --silent --show-error --location --fail https://fill.papermc.io/v3/projects/paper/versions \
| jq -r '
[
.versions[] |
select(.version.support.status == "SUPPORTED") ] |
.[0] |
"\(.version.id)-\(.builds[-1])"
'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: python-3.12
command: |
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/indygreg/python-build-standalone/releases/latest" \
| jq --raw-output '.assets[].name' \
| grep -E -- '-x86_64-unknown-linux-musl-install_only.tar.gz$' \
| sed -E 's/^cpython-([^-]+)-.+$/\\1/' \
| grep -P '^3\\.12\\.' \
| tr '+' '.' \
| sort -Vr \
| head -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: python
command: |
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/indygreg/python-build-standalone/releases/latest" \
| jq --raw-output '.assets[].name' \
| grep -E -- '-x86_64-unknown-linux-musl-install_only.tar.gz$' \
| grep -E '^cpython-[0-9]+\\.[0-9]+\\.[0-9]+\\+' \
| sed -E 's/^cpython-([^-]+)-.+$/\\1/' \
| tr '+' '.' \
| sort -Vr \
| head -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: rke2
command: |
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/rancher/rke2/releases/latest" \
| jq --raw-output '.tag_name' \
| sed -E 's/^v([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)\\+rke2r([[:digit:]]+)$/\\1.\\2/'
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: spark
command: |
SPARK_BUILD="$(
curl --silent --show-error --location --fail "https://ci.lucko.me/job/spark/api/json?pretty=true" \
| jq --raw-output '.builds[0].number'
)"
SPARK_VERSION="$(
curl -sSLf "https://ci.lucko.me/job/spark/${SPARK_BUILD}/api/json?pretty=true" \
| jq -r '.artifacts[] | select(.relativePath | endswith("-bukkit.jar")) | .relativePath' \
| cut -d/ -f4 \
| cut -d- -f2
)"
echo "${SPARK_VERSION}-${SPARK_BUILD}"
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: texlive
prerequisites: xq
command: |
curl --silent --show-error --location --fail \
--url https://texlive.info/historic/systems/texlive \
| grep 'href="[0-9]' \
| sed -E 's/^.+<a href="([^"]+)".+$/\\1/' \
| cut -d/ -f1 \
| tail -n 1
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/custom-release@$CI_COMMIT_SHA
inputs:
name: velocity
command: |
curl --silent --show-error --location --fail \
--url "https://api.github.com/repos/rancher/rke2/releases/latest" \
| jq --raw-output '.tag_name' \
| sed -E 's/^v([[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)\\+rke2r([[:digit:]]+)$/\\1.\\2/'