Compare commits

...

11 Commits

Author SHA1 Message Date
LinuxServer-CI
94e137e87f Bot Updating Package Versions 2024-01-22 17:41:54 +00:00
LinuxServer-CI
a9df15473e Bot Updating Package Versions 2024-01-20 20:18:35 +00:00
LinuxServer-CI
24919c86a2 Bot Updating Package Versions 2024-01-13 20:31:25 +00:00
LinuxServer-CI
a121f3a64a Bot Updating Templated Files 2024-01-13 20:19:04 +00:00
LinuxServer-CI
33e35e89b8 Bot Updating Templated Files 2024-01-13 20:16:52 +00:00
LinuxServer-CI
5e7e1b2bda Bot Updating Package Versions 2024-01-06 20:17:06 +00:00
LinuxServer-CI
4bfbc226a4 Bot Updating Package Versions 2023-12-21 22:40:42 +00:00
LinuxServer-CI
9c28be3eb4 Bot Updating Package Versions 2023-12-16 20:17:57 +00:00
LinuxServer-CI
dac826bc40 Bot Updating Package Versions 2023-12-09 20:17:51 +00:00
LinuxServer-CI
7e16b5c8be Bot Updating Package Versions 2023-11-29 21:41:18 +00:00
LinuxServer-CI
14c35108cf Bot Updating Package Versions 2023-11-25 20:17:26 +00:00
3 changed files with 186 additions and 193 deletions

295
Jenkinsfile vendored
View File

@@ -16,6 +16,7 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab') GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0') GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id') GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
CONTAINER_NAME = 'code-server' CONTAINER_NAME = 'code-server'
BUILD_VERSION_ARG = 'CODE_RELEASE' BUILD_VERSION_ARG = 'CODE_RELEASE'
LS_USER = 'linuxserver' LS_USER = 'linuxserver'
@@ -58,11 +59,16 @@ pipeline {
env.COMMIT_SHA = sh( env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''', script: '''git rev-parse HEAD''',
returnStdout: true).trim() returnStdout: true).trim()
env.GH_DEFAULT_BRANCH = sh(
script: '''git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||' ''',
returnStdout: true).trim()
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
} }
sh '''#! /bin/bash
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
script{ script{
env.LS_RELEASE_NUMBER = sh( env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''', script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
@@ -120,7 +126,7 @@ pipeline {
steps{ steps{
script{ script{
env.EXT_RELEASE_CLEAN = sh( env.EXT_RELEASE_CLEAN = sh(
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''', script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/ ]//g' ''',
returnStdout: true).trim() returnStdout: true).trim()
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/ def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
@@ -138,7 +144,7 @@ pipeline {
} }
if (env.SEMVER != null) { if (env.SEMVER != null) {
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") { if (BRANCH_NAME != "${env.GH_DEFAULT_BRANCH}") {
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}" env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
} }
println("SEMVER: ${env.SEMVER}") println("SEMVER: ${env.SEMVER}")
@@ -256,115 +262,150 @@ pipeline {
} }
} }
steps { steps {
sh '''#! /bin/bash withCredentials([
set -e [
TEMPDIR=$(mktemp -d) $class: 'UsernamePasswordMultiBinding',
docker pull ghcr.io/linuxserver/jenkins-builder:latest credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest usernameVariable: 'DOCKERUSER',
# Stage 1 - Jenkinsfile update passwordVariable: 'DOCKERPASS'
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} sh '''#! /bin/bash
cd ${TEMPDIR}/repo/${LS_REPO} set -e
git checkout -f master TEMPDIR=$(mktemp -d)
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ docker pull ghcr.io/linuxserver/jenkins-builder:latest
git add Jenkinsfile docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
git commit -m 'Bot Updating Templated Files' # Stage 1 - Jenkinsfile update
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} mkdir -p ${TEMPDIR}/repo
echo "Updating Jenkinsfile" git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
rm -Rf ${TEMPDIR} cd ${TEMPDIR}/repo/${LS_REPO}
exit 0 git checkout -f master
else cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
echo "Jenkinsfile is up to date." git add Jenkinsfile
fi git commit -m 'Bot Updating Templated Files'
# Stage 2 - Delete old templates git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
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" git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
for i in ${OLD_TEMPLATES}; do echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
if [[ -f "${i}" ]]; then echo "Updating Jenkinsfile"
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}" rm -Rf ${TEMPDIR}
fi exit 0
done
if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f master
for i in ${TEMPLATES_TO_DELETE}; do
git rm "${i}"
done
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old and deprecated templates"
rm -Rf ${TEMPDIR}
exit 0
else
echo "No templates to delete"
fi
# 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)
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f master
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cp --parents readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/ || :
cd ${TEMPDIR}/repo/${LS_REPO}/
if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then
echo ".jenkins-external" >> .gitignore
git add .gitignore
fi
git add readme-vars.yml ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
mkdir -p ${TEMPDIR}/docs
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -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
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
cd ${TEMPDIR}/docs/docker-documentation
git add docs/images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
fi
mkdir -p ${TEMPDIR}/unraid
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
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}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -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
cd ${TEMPDIR}/unraid/templates/
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
echo "Image is on the ignore list, marking Unraid template as deprecated"
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add -u unraid/${CONTAINER_NAME}.xml
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
git commit -m 'Bot Moving Deprecated Unraid Template' || :
else else
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/ echo "Jenkinsfile is up to date."
git add unraid/${CONTAINER_NAME}.xml
git commit -m 'Bot Updating Unraid Template'
fi fi
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all # Stage 2 - Delete old templates
fi 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"
rm -Rf ${TEMPDIR}''' for i in ${OLD_TEMPLATES}; do
script{ if [[ -f "${i}" ]]; then
env.FILES_UPDATED = sh( TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''', fi
returnStdout: true).trim() done
if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f master
for i in ${TEMPLATES_TO_DELETE}; do
git rm "${i}"
done
git commit -m 'Bot Updating Templated Files'
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"
rm -Rf ${TEMPDIR}
exit 0
else
echo "No templates to delete"
fi
# 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)
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f master
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cp --parents readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/ || :
cd ${TEMPDIR}/repo/${LS_REPO}/
if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then
echo ".jenkins-external" >> .gitignore
git add .gitignore
fi
git add readme-vars.yml ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
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}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
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
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
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
git commit -m 'Bot Updating Documentation'
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}
fi
mkdir -p ${TEMPDIR}/unraid
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
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
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
echo "Image is on the ignore list, marking Unraid template as deprecated"
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add -u unraid/${CONTAINER_NAME}.xml
git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || :
git commit -m 'Bot Moving Deprecated Unraid Template' || :
else
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add unraid/${CONTAINER_NAME}.xml
git commit -m 'Bot Updating Unraid Template'
fi
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH}
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH}
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
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
DH_TOKEN=$(curl -d '{"username":"'${DOCKERUSER}'", "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 PATCH \
-d "{\\"full_description\\":$(jq -Rsa . ${DH_README_SYNC_PATH})}" \
https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE} || :
else
echo "Not the default Github branch. Skipping readme sync to Docker Hub."
fi
rm -Rf ${TEMPDIR}'''
script{
env.FILES_UPDATED = sh(
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
} }
} }
} }
@@ -558,7 +599,8 @@ pipeline {
wait wait
git add package_versions.txt git add package_versions.txt
git commit -m 'Bot Updating Package Versions' git commit -m 'Bot Updating Package Versions'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all 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/packages-${COMMIT_SHA}-${BUILD_NUMBER} echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process" echo "Package tag updated, stopping build process"
else else
@@ -854,39 +896,6 @@ EOF
) ''' ) '''
} }
} }
// Use helper container to sync the current README on master to the dockerhub endpoint
stage('Sync-README') {
when {
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
docker pull ghcr.io/linuxserver/jenkins-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
docker pull ghcr.io/linuxserver/readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
rm -Rf ${TEMPDIR} '''
}
}
}
// If this is a Pull request send the CI link as a comment on it // If this is a Pull request send the CI link as a comment on it
stage('Pull Request Comment') { stage('Pull Request Comment') {
when { when {

View File

@@ -86,7 +86,6 @@ To help you get started creating a container from this image you can either use
```yaml ```yaml
--- ---
version: "2.1"
services: services:
code-server: code-server:
image: lscr.io/linuxserver/code-server:latest image: lscr.io/linuxserver/code-server:latest
@@ -215,7 +214,7 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
## Updating Info ## Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image. Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Below are the instructions for updating containers: Below are the instructions for updating containers:
@@ -280,21 +279,6 @@ Below are the instructions for updating containers:
docker image prune docker image prune
``` ```
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one run:
```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once code-server
```
* You can also remove the old dangling images: `docker image prune`
**warning**: We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
### Image Update Notifications - Diun (Docker Image Update Notifier) ### Image Update Notifications - Diun (Docker Image Update Notifier)
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. **tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

View File

@@ -13,12 +13,20 @@ NAME VERSION
@tootallnate/once 3.0.0 npm @tootallnate/once 3.0.0 npm
@tootallnate/quickjs-emscripten 0.23.0 npm @tootallnate/quickjs-emscripten 0.23.0 npm
@vscode/iconv-lite-umd 0.7.0 npm @vscode/iconv-lite-umd 0.7.0 npm
@vscode/proxy-agent 0.17.5 npm @vscode/proxy-agent 0.18.2 npm
@vscode/ripgrep 1.15.6 npm @vscode/ripgrep 1.15.9 npm
@vscode/spdlog 0.13.12 npm @vscode/spdlog 0.13.12 npm
@vscode/vscode-languagedetection 1.0.21 npm @vscode/vscode-languagedetection 1.0.21 npm
@vscode/windows-process-tree 0.5.0 npm @vscode/windows-process-tree 0.5.0 npm
@vscode/windows-registry 1.1.0 npm @vscode/windows-registry 1.1.0 npm
@xterm/addon-canvas 0.6.0-beta.14 npm
@xterm/addon-image 0.7.0-beta.12 npm
@xterm/addon-search 0.14.0-beta.14 npm
@xterm/addon-serialize 0.12.0-beta.14 npm
@xterm/addon-unicode11 0.7.0-beta.14 npm
@xterm/addon-webgl 0.17.0-beta.14 npm
@xterm/headless 5.4.0-beta.14 npm
@xterm/xterm 5.4.0-beta.14 npm
abbrev 1.1.1 npm abbrev 1.1.1 npm
accepts 1.3.8 npm accepts 1.3.8 npm
adduser 3.118ubuntu5 deb adduser 3.118ubuntu5 deb
@@ -26,8 +34,8 @@ agent-base 6.0.2
agent-base 7.1.0 npm agent-base 7.1.0 npm
ansi-regex 5.0.1 npm ansi-regex 5.0.1 npm
aproba 2.0.0 npm aproba 2.0.0 npm
apt 2.4.10 deb apt 2.4.11 deb
apt-utils 2.4.10 deb apt-utils 2.4.11 deb
are-we-there-yet 2.0.0 npm are-we-there-yet 2.0.0 npm
argon2 0.31.1 npm argon2 0.31.1 npm
argparse 2.0.1 npm argparse 2.0.1 npm
@@ -61,7 +69,7 @@ charenc 0.0.2
chownr 1.1.4 npm chownr 1.1.4 npm
chownr 2.0.0 npm chownr 2.0.0 npm
clojure 1.0.0 npm clojure 1.0.0 npm
code-server 4.19.0 npm code-server 4.20.1 npm
coffeescript 1.0.0 npm coffeescript 1.0.0 npm
color-support 1.1.3 npm color-support 1.1.3 npm
compressible 2.0.18 npm compressible 2.0.18 npm
@@ -82,7 +90,7 @@ crypt 0.0.2
csharp 1.0.0 npm csharp 1.0.0 npm
css 1.0.0 npm css 1.0.0 npm
css-language-features 1.0.0 npm css-language-features 1.0.0 npm
curl 7.81.0-1ubuntu1.14 deb curl 7.81.0-1ubuntu1.15 deb
dart 1.0.0 npm dart 1.0.0 npm
dash 0.5.11+git20210903+057cd650a4ed-3build1 deb dash 0.5.11+git20210903+057cd650a4ed-3build1 deb
data-uri-to-buffer 5.0.1 npm data-uri-to-buffer 5.0.1 npm
@@ -129,7 +137,7 @@ file-uri-to-path 1.0.0
fill-range 7.0.1 npm fill-range 7.0.1 npm
finalhandler 1.1.2 npm finalhandler 1.1.2 npm
findutils 4.8.0-1ubuntu3 deb findutils 4.8.0-1ubuntu3 deb
follow-redirects 1.15.3 npm follow-redirects 1.15.4 npm
forwarded 0.2.0 npm forwarded 0.2.0 npm
fresh 0.5.2 npm fresh 0.5.2 npm
fs-constants 1.0.0 npm fs-constants 1.0.0 npm
@@ -201,7 +209,7 @@ jake 1.0.0
java 1.0.0 npm java 1.0.0 npm
javascript 1.0.0 npm javascript 1.0.0 npm
jq 1.6-2.1ubuntu3 deb jq 1.6-2.1ubuntu3 deb
js-debug 1.84.0 npm js-debug 1.85.0 npm
js-debug-companion 1.1.2 npm js-debug-companion 1.1.2 npm
js-yaml 4.1.0 npm js-yaml 4.1.0 npm
jschardet 3.0.0 npm jschardet 3.0.0 npm
@@ -215,7 +223,7 @@ latex 1.0.0
less 1.0.0 npm less 1.0.0 npm
less 590-1ubuntu0.22.04.1 deb less 590-1ubuntu0.22.04.1 deb
libacl1 2.3.1-1 deb libacl1 2.3.1-1 deb
libapt-pkg6.0 2.4.10 deb libapt-pkg6.0 2.4.11 deb
libassuan0 2.5.5-1build1 deb libassuan0 2.5.5-1build1 deb
libatomic1 12.3.0-1ubuntu1~22.04 deb libatomic1 12.3.0-1ubuntu1~22.04 deb
libattr1 1:2.5.1-1build1 deb libattr1 1:2.5.1-1build1 deb
@@ -232,8 +240,8 @@ libcap2 1:2.44-1ubuntu0.22.04.1
libcbor0.8 0.8.0-2ubuntu1 deb libcbor0.8 0.8.0-2ubuntu1 deb
libcom-err2 1.46.5-2ubuntu1.1 deb libcom-err2 1.46.5-2ubuntu1.1 deb
libcrypt1 1:4.4.27-1 deb libcrypt1 1:4.4.27-1 deb
libcurl3-gnutls 7.81.0-1ubuntu1.14 deb libcurl3-gnutls 7.81.0-1ubuntu1.15 deb
libcurl4 7.81.0-1ubuntu1.14 deb libcurl4 7.81.0-1ubuntu1.15 deb
libdb5.3 5.3.28+dfsg1-0.8ubuntu3 deb libdb5.3 5.3.28+dfsg1-0.8ubuntu3 deb
libdebconfclient0 0.261ubuntu1 deb libdebconfclient0 0.261ubuntu1 deb
libedit2 3.1-20210910-1build1 deb libedit2 3.1-20210910-1build1 deb
@@ -267,7 +275,7 @@ libmount1 2.37.2-4ubuntu3
libncurses6 6.3-2ubuntu0.1 deb libncurses6 6.3-2ubuntu0.1 deb
libncursesw6 6.3-2ubuntu0.1 deb libncursesw6 6.3-2ubuntu0.1 deb
libnettle8 3.7.3-1build2 deb libnettle8 3.7.3-1build2 deb
libnghttp2-14 1.43.0-1build3 deb libnghttp2-14 1.43.0-1ubuntu0.1 deb
libnpth0 1.6-3build2 deb libnpth0 1.6-3build2 deb
libnsl2 1.3.0-2build2 deb libnsl2 1.3.0-2build2 deb
libonig5 6.9.7.1-2build1 deb libonig5 6.9.7.1-2build1 deb
@@ -278,7 +286,7 @@ libpam-runtime 1.4.0-11ubuntu2.3
libpam0g 1.4.0-11ubuntu2.3 deb libpam0g 1.4.0-11ubuntu2.3 deb
libpcre2-8-0 10.39-3ubuntu0.1 deb libpcre2-8-0 10.39-3ubuntu0.1 deb
libpcre3 2:8.39-13ubuntu0.22.04.1 deb libpcre3 2:8.39-13ubuntu0.22.04.1 deb
libperl5.34 5.34.0-3ubuntu1.2 deb libperl5.34 5.34.0-3ubuntu1.3 deb
libprocps8 2:3.3.17-6ubuntu2 deb libprocps8 2:3.3.17-6ubuntu2 deb
libpsl5 0.21.0-1.2build2 deb libpsl5 0.21.0-1.2build2 deb
libreadline8 8.1.2-1 deb libreadline8 8.1.2-1 deb
@@ -292,9 +300,9 @@ libsemanage-common 3.3-1build2
libsemanage2 3.3-1build2 deb libsemanage2 3.3-1build2 deb
libsepol2 3.3-1build1 deb libsepol2 3.3-1build1 deb
libsmartcols1 2.37.2-4ubuntu3 deb libsmartcols1 2.37.2-4ubuntu3 deb
libsqlite3-0 3.37.2-2ubuntu0.1 deb libsqlite3-0 3.37.2-2ubuntu0.3 deb
libss2 1.46.5-2ubuntu1.1 deb libss2 1.46.5-2ubuntu1.1 deb
libssh-4 0.9.6-2ubuntu0.22.04.1 deb libssh-4 0.9.6-2ubuntu0.22.04.2 deb
libssl3 3.0.2-0ubuntu1.10 deb libssl3 3.0.2-0ubuntu1.10 deb
libstdc++6 12.3.0-1ubuntu1~22.04 deb libstdc++6 12.3.0-1ubuntu1~22.04 deb
libsystemd0 249.11-0ubuntu3.9 deb libsystemd0 249.11-0ubuntu3.9 deb
@@ -315,7 +323,7 @@ libxmuu1 2:1.1.3-3
libxxhash0 0.8.1-1 deb libxxhash0 0.8.1-1 deb
libzstd1 1.4.8+dfsg-3build1 deb libzstd1 1.4.8+dfsg-3build1 deb
limiter 2.1.0 npm limiter 2.1.0 npm
locales 2.35-0ubuntu3.4 deb locales 2.35-0ubuntu3.6 deb
log 1.0.0 npm log 1.0.0 npm
login 1:4.8.1-2ubuntu2.1 deb login 1:4.8.1-2ubuntu2.1 deb
logsave 1.46.5-2ubuntu1.1 deb logsave 1.46.5-2ubuntu1.1 deb
@@ -381,7 +389,7 @@ objective-c 1.0.0
on-finished 2.3.0 npm on-finished 2.3.0 npm
on-headers 1.0.2 npm on-headers 1.0.2 npm
once 1.4.0 npm once 1.4.0 npm
openssh-client 1:8.9p1-3ubuntu0.4 deb openssh-client 1:8.9p1-3ubuntu0.6 deb
openssl 3.0.2-0ubuntu1.12 deb openssl 3.0.2-0ubuntu1.12 deb
os-tmpdir 1.0.2 npm os-tmpdir 1.0.2 npm
pac-proxy-agent 7.0.1 npm pac-proxy-agent 7.0.1 npm
@@ -394,9 +402,9 @@ path-to-regexp 0.1.7
pem 1.14.8 npm pem 1.14.8 npm
pend 1.2.0 npm pend 1.2.0 npm
perl 1.0.0 npm perl 1.0.0 npm
perl 5.34.0-3ubuntu1.2 deb perl 5.34.0-3ubuntu1.3 deb
perl-base 5.34.0-3ubuntu1.2 deb perl-base 5.34.0-3ubuntu1.3 deb
perl-modules-5.34 5.34.0-3ubuntu1.2 deb perl-modules-5.34 5.34.0-3ubuntu1.3 deb
php 1.0.0 npm php 1.0.0 npm
php-language-features 1.0.0 npm php-language-features 1.0.0 npm
picomatch 2.3.1 npm picomatch 2.3.1 npm
@@ -487,9 +495,9 @@ tunnel-agent 0.6.0
tunnel-forwarding 1.0.0 npm tunnel-forwarding 1.0.0 npm
type-is 1.6.18 npm type-is 1.6.18 npm
typescript 1.0.0 npm typescript 1.0.0 npm
typescript 5.2.2 npm typescript 5.3.2 npm
typescript-language-features 1.0.0 npm typescript-language-features 1.0.0 npm
tzdata 2023c-0ubuntu0.22.04.2 deb tzdata 2023d-0ubuntu0.22.04 deb
ubuntu-keyring 2021.03.26 deb ubuntu-keyring 2021.03.26 deb
universalify 0.1.2 npm universalify 0.1.2 npm
unpipe 1.0.0 npm unpipe 1.0.0 npm
@@ -502,12 +510,12 @@ vb 1.0.0
vscode-css-languageserver 1.0.0 npm vscode-css-languageserver 1.0.0 npm
vscode-extensions 0.0.1 npm vscode-extensions 0.0.1 npm
vscode-html-languageserver 1.0.0 npm vscode-html-languageserver 1.0.0 npm
vscode-js-profile-table 1.0.3 npm vscode-js-profile-table 1.0.8 npm
vscode-json-languageserver 1.3.4 npm vscode-json-languageserver 1.3.4 npm
vscode-markdown-languageserver 0.4.0-alpha.7 npm vscode-markdown-languageserver 0.4.0-alpha.8 npm
vscode-oniguruma 1.7.0 npm vscode-oniguruma 1.7.0 npm
vscode-regexpp 3.1.0 npm vscode-regexpp 3.1.0 npm
vscode-reh 1.84.2 npm vscode-reh 1.85.2 npm
vscode-textmate 9.0.0 npm vscode-textmate 9.0.0 npm
vscode-theme-seti 1.0.0 npm vscode-theme-seti 1.0.0 npm
webidl-conversions 3.0.1 npm webidl-conversions 3.0.1 npm
@@ -519,14 +527,6 @@ ws 8.14.2
xauth 1:1.1-1build2 deb xauth 1:1.1-1build2 deb
xdg-basedir 4.0.0 npm xdg-basedir 4.0.0 npm
xml 1.0.0 npm xml 1.0.0 npm
xterm 5.4.0-beta.32 npm
xterm-addon-canvas 0.6.0-beta.32 npm
xterm-addon-image 0.6.0-beta.21 npm
xterm-addon-search 0.14.0-beta.31 npm
xterm-addon-serialize 0.12.0-beta.31 npm
xterm-addon-unicode11 0.7.0-beta.31 npm
xterm-addon-webgl 0.17.0-beta.31 npm
xterm-headless 5.4.0-beta.32 npm
yallist 4.0.0 npm yallist 4.0.0 npm
yaml 1.0.0 npm yaml 1.0.0 npm
yauzl 2.10.0 npm yauzl 2.10.0 npm