-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
162 lines (147 loc) · 6.36 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
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: docker-desktop
command: |
curl --silent --show-error --location --fail \
"https://github.com/docker/docs/raw/main/content/manuals/desktop/release-notes.md" \
| grep '{{< desktop-install-v2 all=true' \
| head -n 1 \
| sed -E 's/^.+version="([^"]+)".+$/\\1/'
include:
- 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)"'
include:
- 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: 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://api.papermc.io/v2/projects/paper" \
| jq --raw-output '.version_groups[-1]' \
| xargs -I{} \
curl --silent --show-error --location --fail "https://api.papermc.io/v2/projects/paper/version_group/{}/builds" \
| jq --raw-output '.builds | map(select(.channel == "default")) | .[-1] | "\(.version)-\(.build)"'
- 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\\.' \
| 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$' \
| 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: 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/'