Compare commits

...
3 changed files with 114 additions and 114 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
+28 -26
View File
@@ -5,7 +5,7 @@ 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
@@ -14,10 +14,10 @@ alpine-keys 2.5-r0 apk
alpine-release 3.22.3-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
@@ -28,8 +28,8 @@ 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.60 python
botocore 1.42.60 python
boto3 1.42.83 python
botocore 1.42.83 python
brotli 1.2.0 python
brotli-libs 1.1.0-r2 apk
busybox 1.37.0-r20 apk
@@ -40,21 +40,21 @@ ca-certificates-bundle 20250911-r0 apk
catatonit 0.2.1-r0 apk
certifi 2026.2.25 python
cffi 2.0.0 python
chardet 7.0.0 python
charset-normalizer 3.4.4 python
chardet 7.4.0.post2 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.2 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 46.0.6 python
curl 8.14.1-r2 apk
decorator 5.2.1 python
defusedxml 0.7.1 python
@@ -64,11 +64,11 @@ 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.0 python
flexget 3.19.10 python
frozenlist 1.8.0 python
ftputil 5.1.0 python
gdbm 1.24-r0 apk
@@ -92,7 +92,8 @@ importlib-metadata 8.7.1 python
importlib-resources 6.5.2 python
itsdangerous 2.2.0 python
jaraco-collections 5.2.1 python
jaraco-context 6.1.0 python (+1 duplicate)
jaraco-context 6.1.0 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
@@ -108,7 +109,7 @@ libbsd 0.12.2-r0 apk
libbz2 1.0.8-r6 apk
libcrypto3 3.5.5-r0 apk
libcurl 8.14.1-r2 apk
libexpat 2.7.4-r0 apk
libexpat 2.7.5-r0 apk
libffi 3.4.8-r0 apk
libgcc 14.2.0-r6 apk
libidn2 2.3.7-r0 apk
@@ -127,7 +128,8 @@ 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.1 python
mpdecimal 4.0.1-r0 apk
multidict 6.7.1 python
musl 1.2.5-r10 apk
@@ -135,15 +137,15 @@ musl-utils 1.2.5-r10 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)
paramiko 3.5.1 python
pendulum 3.2.0 python
pip 26.0.1 python
platformdirs 4.4.0 python
platformdirs 4.9.2 python
plexapi 4.18.0 python
platformdirs 4.9.4 python
plexapi 4.18.1 python
plumbum 1.10.0 python
portend 3.2.1 python
procps-ng 4.0.4-r3 apk
@@ -152,17 +154,17 @@ psutil 7.2.2 python
pyc 3.12.12-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
python-telegram-bot 22.7 python
python3 3.12.12-r0 apk
python3-pyc 3.12.12-r0 apk
python3-pycache-pyc0 3.12.12-r0 apk
@@ -172,13 +174,13 @@ 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
requests 2.33.1 python
rich 14.3.3 python
rpds-py 0.30.0 python
rpyc 6.0.2 python
s3transfer 0.16.0 python
scanelf 1.3.8-r1 apk
setuptools 82.0.0 python
setuptools 82.0.1 python
sgmllib3k 1.0.0 python
shadow 4.17.3-r0 apk
shellingham 1.5.4 python
@@ -188,7 +190,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
@@ -203,14 +205,14 @@ triangular 2.5.0 npm
typer 0.24.1 python
typer-slim 0.24.0 python
typing-extensions 4.15.0 python
tzdata 2025.3 python
tzdata 2025c-r0 apk
tzdata 2026.1 python
tzdata 2026a-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
yarl 1.23.0 python
+1 -1
View File
@@ -4,4 +4,4 @@
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 5050" \
cd /config s6-setuidgid abc python3 /lsiopy/bin/flexget \
--loglevel "${FG_LOG_LEVEL:-info}" --logfile "${FG_LOG_FILE:-/config/.flexget/flexget.log}" -c "${FG_CONFIG_FILE:-/config/.flexget/config.yml}" daemon start --autoreload-config
--loglevel "${FG_LOG_LEVEL:-info}" --logfile "${FG_LOG_FILE:-/config/.flexget/flexget.log}" -c "${FG_CONFIG_FILE:-/config/.flexget/config.yml}" daemon start