-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added all releases to gitlab pipeline
- Loading branch information
1 parent
bcc57de
commit bdbf19e
Showing
8 changed files
with
305 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
k3s-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
script: | ||
- | | ||
VERSION="$( | ||
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/' | ||
)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to fetch latest tag and extract version from GitHub" | ||
exit 1 | ||
fi | ||
echo "Got version <${VERSION}>" | ||
echo "version=${VERSION}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
k3s-release: | ||
needs: | ||
- k3s-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing k3s v${VERSION}" | ||
if release-cli get --tag-name k3s/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "k3s v${VERSION}" \ | ||
--description "Custom release of k3s v${VERSION}" \ | ||
--tag-name "k3s/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
namespace-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
script: | ||
- | | ||
VERSION="$( | ||
curl --silent --show-error --location --fail https://github.com/namespacelabs/homebrew-namespace/raw/main/nsc.rb \ | ||
| grep version \ | ||
| cut -d'"' -f2 | ||
)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to fetch latest tag and extract version from GitHub" | ||
exit 1 | ||
fi | ||
echo "Got version <${VERSION}>" | ||
echo "version=${VERSION}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
namespace-release: | ||
needs: | ||
- namespace-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing namespace v${VERSION}" | ||
if release-cli get --tag-name namespace/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "namespace v${VERSION}" \ | ||
--description "Custom release of namespace v${VERSION}" \ | ||
--tag-name "namespace/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
nodejs-lts-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
script: | ||
- | | ||
MAJOR_VERSION="$( | ||
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' | ||
)" | ||
if test -z "${MAJOR_VERSION}"; then | ||
echo "Failed to fetch latest tag and extract major version from release schedule" | ||
exit 1 | ||
fi | ||
echo "### Found LTS major version ${MAJOR_VERSION}" | ||
VERSION="$( | ||
git ls-remote https://github.com/nodejs/node "refs/tags/${MAJOR_VERSION}.*" \ | ||
| grep -v '\^{}' \ | ||
| cut -f2 | cut -d/ -f3 | tr -d v \ | ||
| sort -Vr | head -1 | ||
)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to fetch tag and extract version from GitHub" | ||
exit 1 | ||
fi | ||
echo "### Found LTS version ${VERSION}" | ||
echo "version=${VERSION}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
nodejs-lts-release: | ||
needs: | ||
- nodejs-lts-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing nodejs-lts v${VERSION}" | ||
if release-cli get --tag-name nodejs-lts/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "nodejs-lts v${VERSION}" \ | ||
--description "Custom release of nodejs-lts v${VERSION}" \ | ||
--tag-name "nodejs-lts/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
passage-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
script: | ||
- | | ||
git clone https://github.com/FiloSottile/passage | ||
cd passage | ||
VERSION="$(git rev-list --count --all)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to count commits" | ||
exit 1 | ||
fi | ||
COMMIT="$(git rev-parse --short HEAD)" | ||
if test -z "${COMMIT}"; then | ||
echo "Failed to get short commit hash" | ||
exit 1 | ||
fi | ||
echo "Got version <${VERSION}.${COMMIT}>" | ||
echo "version=${VERSION}.${COMMIT}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
passage-release: | ||
needs: | ||
- passage-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing passage v${VERSION}" | ||
if release-cli get --tag-name passage/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "passage v${VERSION}" \ | ||
--description "Custom release of passage v${VERSION}" \ | ||
--tag-name "passage/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
python-3.12-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
variables: | ||
# renovate: datasource=github-releases depName=indygreg/python-build-standalone versioning=loose | ||
INDYGREG_PYTHON_BUILD_STANDALONE_VERSION: 20241016 | ||
script: | ||
- | | ||
# Find cpython-${PYTHON_VERSION}+${version}-${arch}-unknown-linux-musl-install_only.tar.gz | ||
VERSION="$( | ||
curl --silent --show-error --location --fail \ | ||
--url "https://api.github.com/repos/indygreg/python-build-standalone/releases/tags/${INDYGREG_PYTHON_BUILD_STANDALONE_VERSION}" \ | ||
| 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\.\d+$' \ | ||
| sort -Vr \ | ||
| head -n 1 | ||
)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to fetch latest tag and extract version from GitHub" | ||
exit 1 | ||
fi | ||
echo "Got version <${VERSION}>" | ||
echo "version=${VERSION}.${INDYGREG_PYTHON_BUILD_STANDALONE_VERSION}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
python-3.12-release: | ||
needs: | ||
- python-3.12-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing python-3.12 v${VERSION}" | ||
if release-cli get --tag-name python-3.12/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "python-3.12 v${VERSION}" \ | ||
--description "Custom release of python-3.12 v${VERSION}" \ | ||
--tag-name "python-3.12/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
k3s-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
variables: | ||
# renovate: datasource=github-releases depName=indygreg/python-build-standalone versioning=loose | ||
INDYGREG_PYTHON_BUILD_STANDALONE_VERSION: 20241016 | ||
script: | ||
- | | ||
# Find cpython-${PYTHON_VERSION}+${version}-${arch}-unknown-linux-musl-install_only.tar.gz | ||
VERSION="$( | ||
curl --silent --show-error --location --fail \ | ||
--url "https://api.github.com/repos/indygreg/python-build-standalone/releases/tags/${INDYGREG_PYTHON_BUILD_STANDALONE_VERSION}" \ | ||
| jq --raw-output '.assets[].name' \ | ||
| grep -E -- '-x86_64-unknown-linux-musl-install_only.tar.gz$' \ | ||
| sed -E 's/^cpython-([^+]+)\+.+$/\1/' \ | ||
| grep -P '^\d+\.\d+\.\d+$' \ | ||
| sort -Vr \ | ||
| head -n 1 | ||
)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to fetch latest tag and extract version from GitHub" | ||
exit 1 | ||
fi | ||
echo "Got version <${VERSION}>" | ||
echo "version=${VERSION}.${INDYGREG_PYTHON_BUILD_STANDALONE_VERSION}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
k3s-release: | ||
needs: | ||
- k3s-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing k3s v${VERSION}" | ||
if release-cli get --tag-name k3s/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "k3s v${VERSION}" \ | ||
--description "Custom release of k3s v${VERSION}" \ | ||
--tag-name "k3s/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
rke2-check: | ||
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling | ||
script: | ||
- | | ||
VERSION="$( | ||
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/' | ||
)" | ||
if test -z "${VERSION}"; then | ||
echo "Failed to fetch latest tag and extract version from GitHub" | ||
exit 1 | ||
fi | ||
echo "Got version <${VERSION}>" | ||
echo "version=${VERSION}" >>variables.env | ||
artifacts: | ||
reports: | ||
dotenv: variables.env | ||
|
||
rke2-release: | ||
needs: | ||
- rke2-check | ||
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0 | ||
script: | ||
- | | ||
echo "### Releasing rke2 v${VERSION}" | ||
if release-cli get --tag-name rke2/${VERSION}; then | ||
echo " Already exists" | ||
exit 0 | ||
else | ||
release-cli create \ | ||
--name "rke2 v${VERSION}" \ | ||
--description "Custom release of rke2 v${VERSION}" \ | ||
--tag-name "rke2/${VERSION}" \ | ||
--ref "${CI_COMMIT_SHA}" | ||
fi |