Compare commits

...

4 Commits

Author SHA1 Message Date
LinuxServer-CI
17570939d5 Bot Updating Package Versions 2024-03-30 20:17:17 +00:00
LinuxServer-CI
0c5f0c4a76 Bot Updating Package Versions 2024-03-23 20:19:31 +00:00
LinuxServer-CI
73811e24e4 Bot Updating Package Versions 2024-03-14 20:44:29 +00:00
LinuxServer-CI
309d28852d Bot Updating Templated Files 2024-03-14 20:41:23 +00:00
2 changed files with 80 additions and 49 deletions

61
Jenkinsfile vendored
View File

@@ -268,8 +268,15 @@ pipeline {
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
# Stage 1 - Jenkinsfile update
# Cloned repo paths for templating:
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch master of ${LS_USER}/${LS_REPO} for running the jenkins builder on
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch master of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
git clone --branch master --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true ghcr.io/linuxserver/jenkins-builder:latest
echo "Starting Stage 1 - Jenkinsfile update"
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
@@ -281,13 +288,13 @@ pipeline {
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile"
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "Jenkinsfile is up to date."
fi
# Stage 2 - Delete old templates
echo "Starting Stage 2 - Delete old templates"
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml Dockerfile.armhf"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
@@ -306,13 +313,13 @@ pipeline {
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old and deprecated templates"
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "No templates to delete"
fi
# Stage 3 - Update templates
echo "Starting Stage 3 - Update templates"
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
@@ -336,9 +343,14 @@ pipeline {
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "No templates to update"
fi
echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub"
mkdir -p ${TEMPDIR}/docs
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
@@ -346,6 +358,7 @@ pipeline {
cd ${TEMPDIR}/docs/docker-documentation
GH_DOCS_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
git add docs/images/docker-${CONTAINER_NAME}.md
echo "Updating docs repo"
git commit -m 'Bot Updating Documentation'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} || \
@@ -353,6 +366,8 @@ pipeline {
sleep $((RANDOM % MAXWAIT)) && \
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase && \
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH})
else
echo "Docs update not needed, skipping"
fi
mkdir -p ${TEMPDIR}/unraid
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
@@ -363,6 +378,7 @@ pipeline {
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
fi
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
echo "Updating Unraid template"
cd ${TEMPDIR}/unraid/templates/
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
@@ -382,16 +398,27 @@ pipeline {
sleep $((RANDOM % MAXWAIT)) && \
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase && \
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH})
else
echo "No updates to Unraid template needed, skipping"
fi
# Stage 4 - Sync Readme to Docker Hub
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]]; then
if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) > 25000 ]]; then
if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) -gt 25000 ]]; then
echo "Readme is longer than 25,000 characters. Syncing the lite version to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/README.lite"
else
echo "Syncing readme to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/README.md"
fi
if curl -s https://hub.docker.com/v2/namespaces/${DOCKERHUB_IMAGE%%/*}/repositories/${DOCKERHUB_IMAGE##*/}/tags | jq -r '.message' | grep -q 404; then
echo "Docker Hub endpoint doesn't exist. Creating endpoint first."
DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"'${DOCKERHUB_IMAGE##*/}'", "namespace":"'${DOCKERHUB_IMAGE%%/*}'"}' \
https://hub.docker.com/v2/repositories/ || :
fi
DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
@@ -456,14 +483,16 @@ pipeline {
}
steps{
sh '''curl -H "Content-Type: application/json" -H "Private-Token: ${GITLAB_TOKEN}" -X POST https://gitlab.com/api/v4/projects \
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"visibility":"public"}' '''
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"visibility":"public"}' '''
sh '''curl -H "Private-Token: ${GITLAB_TOKEN}" -X PUT "https://gitlab.com/api/v4/projects/Linuxserver.io%2F${LS_REPO}" \
-d "mirror=true&import_url=https://github.com/linuxserver/${LS_REPO}.git" '''
}
}
/* ###############

View File

@@ -41,10 +41,10 @@ argparse 2.0.1
array-flatten 2.1.1 npm
ast-types 0.13.4 npm
balanced-match 1.0.2 npm
base-files 12ubuntu4.3 deb
base-files 12ubuntu4.6 deb
base-passwd 3.5.52build1 deb
base64-js 1.5.1 npm
bash 5.1-6ubuntu1 deb
bash 5.1-6ubuntu1.1 deb
bash 5.1.16 binary
basic-ftp 5.0.3 npm
bat 1.0.0 npm
@@ -68,7 +68,7 @@ charenc 0.0.2
chownr 1.1.4 npm
chownr 2.0.0 npm
clojure 1.0.0 npm
code-server 4.22.0 npm
code-server 4.22.1 npm
coffeescript 1.0.0 npm
color-support 1.1.3 npm
compressible 2.0.18 npm
@@ -82,7 +82,7 @@ cookie 0.4.0
cookie 0.4.1 npm
cookie-parser 1.4.6 npm
cookie-signature 1.0.6 npm
coreutils 8.32-4.1ubuntu1 deb
coreutils 8.32-4.1ubuntu1.1 deb
cpp 1.0.0 npm
cron 3.0pl1-137ubuntu3 deb
crypt 0.0.2 npm
@@ -112,7 +112,7 @@ diff 1.0.0
diffutils 1:3.8-0ubuntu2 deb
dirmngr 2.2.27-3ubuntu2.1 deb
docker 1.0.0 npm
dpkg 1.21.1ubuntu2.2 deb
dpkg 1.21.1ubuntu2.3 deb
e2fsprogs 1.46.5-2ubuntu1.1 deb
ee-first 1.1.1 npm
emmet 1.0.0 npm
@@ -181,10 +181,12 @@ html-language-features 1.0.0
http-errors 1.7.2 npm
http-errors 1.7.3 npm
http-proxy 1.18.1 npm
http-proxy-agent 7.0.0 npm (+1 duplicate)
http-proxy-agent 7.0.0 npm
http-proxy-agent 7.0.2 npm
httpolyglot 0.1.2 npm
https-proxy-agent 5.0.1 npm
https-proxy-agent 7.0.2 npm (+1 duplicate)
https-proxy-agent 7.0.2 npm
https-proxy-agent 7.0.4 npm
i18next 23.8.2 npm
iconv-lite 0.4.24 npm
ieee754 1.2.1 npm
@@ -232,20 +234,20 @@ libblkid1 2.37.2-4ubuntu3
libbrotli1 1.0.9-2build6 deb
libbsd0 0.11.5-1 deb
libbz2-1.0 1.0.8-5build1 deb
libc-bin 2.35-0ubuntu3.1 deb
libc6 2.35-0ubuntu3.1 deb
libc-bin 2.35-0ubuntu3.6 deb
libc6 2.35-0ubuntu3.6 deb
libcap-ng0 0.7.9-2.2build3 deb
libcap2 1:2.44-1ubuntu0.22.04.1 deb
libcbor0.8 0.8.0-2ubuntu1 deb
libcom-err2 1.46.5-2ubuntu1.1 deb
libcrypt1 1:4.4.27-1 deb
libcurl3-gnutls 7.81.0-1ubuntu1.15 deb
libcurl3-gnutls 7.81.0-1ubuntu1.16 deb
libcurl4 7.81.0-1ubuntu1.15 deb
libdb5.3 5.3.28+dfsg1-0.8ubuntu3 deb
libdebconfclient0 0.261ubuntu1 deb
libedit2 3.1-20210910-1build1 deb
liberror-perl 0.17029-1 deb
libexpat1 2.4.7-1ubuntu0.2 deb
libexpat1 2.4.7-1ubuntu0.3 deb
libext2fs2 1.46.5-2ubuntu1.1 deb
libffi8 3.4.2-4 deb
libfido2-1 1.10.0-1 deb
@@ -254,19 +256,19 @@ libgcrypt20 1.9.4-3ubuntu3
libgdbm-compat4 1.23-1 deb
libgdbm6 1.23-1 deb
libgmp10 2:6.2.1+dfsg-3ubuntu1 deb
libgnutls30 3.7.3-4ubuntu1.2 deb
libgnutls30 3.7.3-4ubuntu1.4 deb
libgpg-error0 1.43-3 deb
libgssapi-krb5-2 1.19.2-2ubuntu0.2 deb
libgssapi-krb5-2 1.19.2-2ubuntu0.3 deb
libhogweed6 3.7.3-1build2 deb
libidn2-0 2.3.2-2build1 deb
libjq1 1.6-2.1ubuntu3 deb
libk5crypto3 1.19.2-2ubuntu0.2 deb
libk5crypto3 1.19.2-2ubuntu0.3 deb
libkeyutils1 1.6.1-2ubuntu3 deb
libkrb5-3 1.19.2-2ubuntu0.2 deb
libkrb5support0 1.19.2-2ubuntu0.2 deb
libkrb5-3 1.19.2-2ubuntu0.3 deb
libkrb5support0 1.19.2-2ubuntu0.3 deb
libksba8 1.6.0-2ubuntu0.2 deb
libldap-2.5-0 2.5.16+dfsg-0ubuntu0.22.04.2 deb
libldap-common 2.5.16+dfsg-0ubuntu0.22.04.2 deb
libldap-2.5-0 2.5.17+dfsg-0ubuntu0.22.04.1 deb
libldap-common 2.5.17+dfsg-0ubuntu0.22.04.1 deb
liblz4-1 1.9.3-2build2 deb
liblzma5 5.2.5-2ubuntu1 deb
libmd0 1.0.4-1build1 deb
@@ -279,14 +281,14 @@ libnpth0 1.6-3build2
libnsl2 1.3.0-2build2 deb
libonig5 6.9.7.1-2build1 deb
libp11-kit0 0.24.0-6build1 deb
libpam-modules 1.4.0-11ubuntu2.3 deb
libpam-modules-bin 1.4.0-11ubuntu2.3 deb
libpam-runtime 1.4.0-11ubuntu2.3 deb
libpam0g 1.4.0-11ubuntu2.3 deb
libpam-modules 1.4.0-11ubuntu2.4 deb
libpam-modules-bin 1.4.0-11ubuntu2.4 deb
libpam-runtime 1.4.0-11ubuntu2.4 deb
libpam0g 1.4.0-11ubuntu2.4 deb
libpcre2-8-0 10.39-3ubuntu0.1 deb
libpcre3 2:8.39-13ubuntu0.22.04.1 deb
libperl5.34 5.34.0-3ubuntu1.3 deb
libprocps8 2:3.3.17-6ubuntu2 deb
libprocps8 2:3.3.17-6ubuntu2.1 deb
libpsl5 0.21.0-1.2build2 deb
libreadline8 8.1.2-1 deb
librtmp1 2.4+20151223.gitfa8646d.1-2build4 deb
@@ -302,14 +304,14 @@ libsmartcols1 2.37.2-4ubuntu3
libsqlite3-0 3.37.2-2ubuntu0.3 deb
libss2 1.46.5-2ubuntu1.1 deb
libssh-4 0.9.6-2ubuntu0.22.04.3 deb
libssl3 3.0.2-0ubuntu1.10 deb
libssl3 3.0.2-0ubuntu1.15 deb
libstdc++6 12.3.0-1ubuntu1~22.04 deb
libsystemd0 249.11-0ubuntu3.9 deb
libsystemd0 249.11-0ubuntu3.12 deb
libtasn1-6 4.18.0-4build1 deb
libtinfo6 6.3-2ubuntu0.1 deb
libtirpc-common 1.3.2-2ubuntu0.1 deb
libtirpc3 1.3.2-2ubuntu0.1 deb
libudev1 249.11-0ubuntu3.9 deb
libudev1 249.11-0ubuntu3.12 deb
libunistring2 1.0-1 deb
libuuid1 2.37.2-4ubuntu3 deb
libx11-6 2:1.7.5-1ubuntu0.3 deb
@@ -324,7 +326,7 @@ libzstd1 1.4.8+dfsg-3build1
limiter 2.1.0 npm
locales 2.35-0ubuntu3.6 deb
log 1.0.0 npm
login 1:4.8.1-2ubuntu2.1 deb
login 1:4.8.1-2ubuntu2.2 deb
logsave 1.46.5-2ubuntu1.1 deb
lru-cache 6.0.0 npm (+1 duplicate)
lru-cache 7.18.3 npm
@@ -394,7 +396,7 @@ os-tmpdir 1.0.2
pac-proxy-agent 7.0.1 npm
pac-resolver 7.0.0 npm
parseurl 1.3.3 npm
passwd 1:4.8.1-2ubuntu2.1 deb
passwd 1:4.8.1-2ubuntu2.2 deb
patch 2.7.6-7build2 deb
path-is-absolute 1.0.1 npm
path-to-regexp 0.1.7 npm
@@ -410,9 +412,9 @@ picomatch 2.3.1
pinentry-curses 1.1.1-1build2 deb
powershell 1.0.0 npm
prebuild-install 7.1.1 npm
procps 2:3.3.17-6ubuntu2 deb
procps 2:3.3.17-6ubuntu2.1 deb
proxy-addr 2.0.7 npm
proxy-agent 6.3.1 npm
proxy-agent 6.4.0 npm
proxy-from-env 1.1.0 npm (+1 duplicate)
publicsuffix 20211207.1025-1 deb
pug 1.0.0 npm
@@ -432,7 +434,7 @@ regenerator-runtime 0.14.0
requires-port 1.0.0 npm
restructuredtext 1.0.0 npm
rimraf 3.0.2 npm
rotating-file-stream 3.1.1 npm
rotating-file-stream 3.2.1 npm
router 2.0.0-alpha.1 npm
ruby 1.0.0 npm
rust 1.0.0 npm
@@ -471,7 +473,7 @@ strip-json-comments 2.0.1
sudo 1.9.9-1ubuntu2.4 deb
swift 1.0.0 npm
sysvinit-utils 3.01-1ubuntu1 deb
tar 1.34+dfsg-1ubuntu0.1.22.04.1 deb
tar 1.34+dfsg-1ubuntu0.1.22.04.2 deb
tar 6.2.0 npm
tar-fs 2.1.1 npm
tar-stream 2.2.0 npm
@@ -514,7 +516,7 @@ vscode-json-languageserver 1.3.4
vscode-markdown-languageserver 0.4.0 npm
vscode-oniguruma 1.7.0 npm
vscode-regexpp 3.1.0 npm
vscode-reh 1.87.0 npm
vscode-reh 1.87.2 npm
vscode-textmate 9.0.0 npm
vscode-theme-seti 1.0.0 npm
webidl-conversions 3.0.1 npm