Compare commits

...
2 changed files with 135 additions and 135 deletions
Vendored
+85 -87
View File
@@ -78,6 +78,7 @@ pipeline {
'''
script{
env.EXIT_STATUS = ''
env.CI_TEST_ATTEMPTED = ''
env.LS_RELEASE = sh(
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
returnStdout: true).trim()
@@ -881,6 +882,7 @@ pipeline {
script{
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
env.CI_TEST_ATTEMPTED = 'true'
}
sh '''#! /bin/bash
set -e
@@ -1083,98 +1085,13 @@ EOF
) '''
}
}
// If this is a Pull request send the CI link as a comment on it
stage('Pull Request Comment') {
when {
not {environment name: 'CHANGE_ID', value: ''}
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''#! /bin/bash
# Function to retrieve JSON data from URL
get_json() {
local url="$1"
local response=$(curl -s "$url")
if [ $? -ne 0 ]; then
echo "Failed to retrieve JSON data from $url"
return 1
fi
local json=$(echo "$response" | jq .)
if [ $? -ne 0 ]; then
echo "Failed to parse JSON data from $url"
return 1
fi
echo "$json"
}
build_table() {
local data="$1"
# Get the keys in the JSON data
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
# Check if keys are empty
if [ -z "$keys" ]; then
echo "JSON report data does not contain any keys or the report does not exist."
return 1
fi
# Build table header
local header="| Tag | Passed |\\n| --- | --- |\\n"
# Loop through the JSON data to build the table rows
local rows=""
for build in $keys; do
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
if [ "$status" = "true" ]; then
status="✅"
else
status="❌"
fi
local row="| "$build" | "$status" |\\n"
rows="${rows}${row}"
done
local table="${header}${rows}"
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
echo "$escaped_table"
}
if [[ "${CI}" = "true" ]]; then
# Retrieve JSON data from URL
data=$(get_json "$CI_JSON_URL")
# Create table from JSON data
table=$(build_table "$data")
echo -e "$table"
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
else
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
fi
'''
}
}
}
/* ######################
Send status to Discord
Comment on PR and Send status to Discord
###################### */
post {
always {
sh '''#!/bin/bash
rm -rf /config/.ssh/id_sign
rm -rf /config/.ssh/id_sign.pub
git config --global --unset gpg.format
git config --global --unset user.signingkey
git config --global --unset commit.gpgsign
'''
script{
script {
env.JOB_DATE = sh(
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
returnStdout: true).trim()
@@ -1217,6 +1134,87 @@ EOF
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
}
script {
if (env.GITHUBIMAGE =~ /lspipepr/){
if (env.CI_TEST_ATTEMPTED == "true"){
sh '''#! /bin/bash
# Function to retrieve JSON data from URL
get_json() {
local url="$1"
local response=$(curl -s "$url")
if [ $? -ne 0 ]; then
echo "Failed to retrieve JSON data from $url"
return 1
fi
local json=$(echo "$response" | jq .)
if [ $? -ne 0 ]; then
echo "Failed to parse JSON data from $url"
return 1
fi
echo "$json"
}
build_table() {
local data="$1"
# Get the keys in the JSON data
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
# Check if keys are empty
if [ -z "$keys" ]; then
echo "JSON report data does not contain any keys or the report does not exist."
return 1
fi
# Build table header
local header="| Tag | Passed |\\n| --- | --- |\\n"
# Loop through the JSON data to build the table rows
local rows=""
for build in $keys; do
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
if [ "$status" = "true" ]; then
status="✅"
else
status="❌"
fi
local row="| "$build" | "$status" |\\n"
rows="${rows}${row}"
done
local table="${header}${rows}"
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
echo "$escaped_table"
}
if [[ "${CI}" = "true" ]]; then
# Retrieve JSON data from URL
data=$(get_json "$CI_JSON_URL")
# Create table from JSON data
table=$(build_table "$data")
echo -e "$table"
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
else
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
fi
'''
}
}
}
sh '''#!/bin/bash
rm -rf /config/.ssh/id_sign
rm -rf /config/.ssh/id_sign.pub
git config --global --unset gpg.format
git config --global --unset user.signingkey
git config --global --unset commit.gpgsign
'''
}
cleanup {
sh '''#! /bin/bash
+50 -48
View File
@@ -5,56 +5,56 @@ acl-libs 2.3.2-r1 apk
ada-libs 2.9.2-r4 apk
aiofiles 24.1.0 python
aiohappyeyeballs 2.6.1 python
aiohttp 3.13.3 python
aiohttp 3.13.5 python
aiohttp-socks 0.11.0 python
aiosignal 1.4.0 python
alpine-baselayout 3.7.0-r0 apk
alpine-baselayout-data 3.7.0-r0 apk
alpine-keys 2.5-r0 apk
alpine-release 3.22.3-r0 apk
alpine-release 3.22.4-r0 apk
aniso8601 10.0.1 python
annotated-doc 0.0.4 python
anyio 4.12.1 python
anyio 4.13.0 python
apk-tools 2.14.9-r3 apk
apscheduler 3.11.2 python
attrs 25.4.0 python
attrs 26.1.0 python
autocommand 2.2.2 python
babelfish 0.6.1 python
backports-tarfile 1.2.0 python
backports-zstd 1.3.0 python
backports-zstd 1.4.0 python
bash 5.2.37-r0 apk
bcrypt 5.0.0 python
beautifulsoup4 4.14.3 python
blinker 1.9.0 python
boost1.84-python3 1.84.0-r3 apk
boost1.84-system 1.84.0-r3 apk
boto3 1.42.68 python
botocore 1.42.68 python
boto3 1.43.2 python
botocore 1.43.2 python
brotli 1.2.0 python
brotli-libs 1.1.0-r2 apk
busybox 1.37.0-r20 apk
busybox-binsh 1.37.0-r20 apk
c-ares 1.34.6-r0 apk
ca-certificates 20250911-r0 apk
ca-certificates-bundle 20250911-r0 apk
ca-certificates 20260413-r0 apk
ca-certificates-bundle 20260413-r0 apk
catatonit 0.2.1-r0 apk
certifi 2026.2.25 python
certifi 2026.4.22 python
cffi 2.0.0 python
chardet 7.1.0 python
charset-normalizer 3.4.6 python
chardet 7.4.3 python
charset-normalizer 3.4.7 python
cheroot 11.1.2 python
cherrypy 18.10.0 python
cli UNKNOWN binary
cli-32 UNKNOWN binary
cli-64 UNKNOWN binary
cli-arm64 UNKNOWN binary
click 8.3.1 python
click 8.3.3 python
click-option-group 0.5.9 python
coreutils 9.7-r1 apk
coreutils-env 9.7-r1 apk
coreutils-fmt 9.7-r1 apk
coreutils-sha512sum 9.7-r1 apk
cryptography 46.0.5 python
cryptography 47.0.0 python
curl 8.14.1-r2 apk
decorator 5.2.1 python
defusedxml 0.7.1 python
@@ -64,15 +64,15 @@ enzyme 0.5.2 python
feedparser 6.0.12 python
findutils 4.10.0-r0 apk
flask 3.1.3 python
flask-compress 1.23 python
flask-compress 1.24 python
flask-cors 6.0.2 python
flask-login 0.6.3 python
flask-restx 1.3.2 python
flexget 3.19.3 python
flexget 3.19.16 python
frozenlist 1.8.0 python
ftputil 5.1.0 python
ftputil 5.2.0 python
gdbm 1.24-r0 apk
greenlet 3.3.2 python
greenlet 3.5.0 python
guessit 3.8.0 python
gui UNKNOWN binary
gui-32 UNKNOWN binary
@@ -87,13 +87,13 @@ httpx 0.28.1 python
hyperframe 6.1.0 python
icu-data-en 76.1-r1 apk
icu-libs 76.1-r1 apk
idna 3.11 python
idna 3.13 python
importlib-metadata 8.7.1 python
importlib-resources 6.5.2 python
importlib-resources 7.1.0 python
itsdangerous 2.2.0 python
jaraco-collections 5.2.1 python
jaraco-context 6.1.0 python
jaraco-context 6.1.1 python
jaraco-context 6.1.2 python
jaraco-functools 4.4.0 python (+1 duplicate)
jaraco-text 4.0.0 python
jaraco-text 4.2.0 python
@@ -107,7 +107,7 @@ libapk2 2.14.9-r3 apk
libattr 2.5.2-r2 apk
libbsd 0.12.2-r0 apk
libbz2 1.0.8-r6 apk
libcrypto3 3.5.5-r0 apk
libcrypto3 3.5.6-r0 apk
libcurl 8.14.1-r2 apk
libexpat 2.7.5-r0 apk
libffi 3.4.8-r0 apk
@@ -119,7 +119,7 @@ libncursesw 6.5_p20250503-r0 apk
libpanelw 6.5_p20250503-r0 apk
libproc2 4.0.4-r3 apk
libpsl 0.21.5-r3 apk
libssl3 3.5.5-r0 apk
libssl3 3.5.6-r0 apk
libstdc++ 14.2.0-r6 apk
libunistring 1.3-r0 apk
linux-pam 1.7.0-r4 apk
@@ -128,56 +128,58 @@ markdown-it-py 4.0.0 python
markupsafe 3.0.3 python
matrix-nio 0.25.2 python
mdurl 0.1.2 python
more-itertools 10.8.0 python (+1 duplicate)
more-itertools 10.8.0 python
more-itertools 11.0.2 python
mpdecimal 4.0.1-r0 apk
multidict 6.7.1 python
musl 1.2.5-r10 apk
musl-utils 1.2.5-r10 apk
musl 1.2.5-r12 apk
musl-utils 1.2.5-r12 apk
ncurses-terminfo-base 6.5_p20250503-r0 apk
netcat-openbsd 1.229.1-r0 apk
nghttp2-libs 1.65.0-r0 apk
nodejs 22.22.0-r0 apk
nodejs 22.22.2-r0 apk
oniguruma 6.9.10-r0 apk
packaging 26.0 python (+1 duplicate)
packaging 26.0 python
packaging 26.2 python
paramiko 3.5.1 python
pendulum 3.2.0 python
pip 26.0.1 python
pip 26.1 python
platformdirs 4.4.0 python
platformdirs 4.9.4 python
plexapi 4.18.0 python
platformdirs 4.9.6 python
plexapi 4.18.1 python
plumbum 1.10.0 python
portend 3.2.1 python
procps-ng 4.0.4-r3 apk
propcache 0.4.1 python
psutil 7.2.2 python
pyc 3.12.12-r0 apk
pyc 3.12.13-r0 apk
pycparser 3.0 python
pycryptodome 3.23.0 python
pygments 2.19.2 python
pygments 2.20.0 python
pymediainfo 7.0.1 python
pynacl 1.6.2 python
pynzb 0.1.0 python
pyparsing 3.3.2 python
pyrss2gen 1.1 python
pysftp 0.2.9 python
pysubs2 1.8.0 python
pysubs2 1.8.1 python
python-dateutil 2.9.0.post0 python
python-socks 2.8.1 python
python-telegram-bot 22.6 python
python3 3.12.12-r0 apk
python3-pyc 3.12.12-r0 apk
python3-pycache-pyc0 3.12.12-r0 apk
python-telegram-bot 22.7 python
python3 3.12.13-r0 apk
python3-pyc 3.12.13-r0 apk
python3-pycache-pyc0 3.12.13-r0 apk
pyyaml 6.0.3 python
qbittorrent-api 2025.11.1 python
rarfile 4.2 python
readline 8.2.13-r1 apk
rebulk 3.2.0 python
referencing 0.37.0 python
requests 2.32.5 python
rich 14.3.3 python
requests 2.33.1 python
rich 15.0.0 python
rpds-py 0.30.0 python
rpyc 6.0.2 python
s3transfer 0.16.0 python
s3transfer 0.17.0 python
scanelf 1.3.8-r1 apk
setuptools 82.0.1 python
sgmllib3k 1.0.0 python
@@ -189,7 +191,7 @@ six 1.17.0 python
skalibs-libs 2.14.4.0-r0 apk
socksio 1.0.0 python
soupsieve 2.8.3 python
sqlalchemy 2.0.48 python
sqlalchemy 2.0.49 python
sqlite-libs 3.49.2-r1 apk
srt 3.5.3 python
ssl_client 1.37.0-r20 apk
@@ -201,22 +203,22 @@ tomlkit 0.14.0 python
trakit 0.2.5 python
transmission-rpc 7.0.11 python
triangular 2.5.0 npm
typer 0.24.1 python
typer 0.25.1 python
typer-slim 0.24.0 python
typing-extensions 4.15.0 python
tzdata 2025.3 python
tzdata 2026a-r0 apk
tzdata 2026.2 python
tzdata 2026b-r0 apk
tzlocal 5.3.1 python
unpaddedbase64 2.1.0 python
urllib3 2.6.3 python
utmps-libs 0.1.3.1-r0 apk
webencodings 0.5.1 python
werkzeug 3.1.6 python
werkzeug 3.1.8 python
wheel 0.46.3 python
xz-libs 5.8.1-r0 apk
xz-libs 5.8.3-r0 apk
yarl 1.23.0 python
zc-lockfile 4.0 python
zipp 3.23.0 python
zlib 1.3.1-r2 apk
zlib 1.3.2-r0 apk
zstd-libs 1.5.7-r0 apk
zxcvbn 4.5.0 python