@@ -58,7 +58,7 @@ pipeline {
58
58
env. CODE_URL = ' https://github.com/' + env. LS_USER + ' /' + env. LS_REPO + ' /commit/' + env. GIT_COMMIT
59
59
env. DOCKERHUB_LINK = ' https://hub.docker.com/r/' + env. DOCKERHUB_IMAGE + ' /tags/'
60
60
env. PULL_REQUEST = env. CHANGE_ID
61
- env. TEMPLATED_FILES = ' Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/greetings .yml ./.github/workflows/stale .yml ./.github/workflows/package_trigger .yml ./.github/workflows/package_trigger_scheduler .yml ./.github/workflows/external_trigger.yml ./.github/workflows/external_trigger_scheduler .yml'
61
+ env. TEMPLATED_FILES = ' Jenkinsfile README.md LICENSE ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler .yml ./.github/workflows/greetings .yml ./.github/workflows/package_trigger_scheduler .yml ./.github/workflows/stale .yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger .yml'
62
62
}
63
63
script{
64
64
env. LS_RELEASE_NUMBER = sh(
@@ -106,7 +106,7 @@ pipeline {
106
106
steps{
107
107
script{
108
108
env. EXT_RELEASE = sh(
109
- script : ''' curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''' ,
109
+ script : ''' curl -H "Authorization: token ${GITHUB_TOKEN}" - s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''' ,
110
110
returnStdout : true ). trim()
111
111
}
112
112
}
@@ -317,22 +317,24 @@ pipeline {
317
317
git commit -m 'Bot Updating Documentation'
318
318
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
319
319
fi
320
- mkdir -p ${TEMPDIR}/unraid
320
+ mkdir -p ${TEMPDIR}/unraid
321
321
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
322
322
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
323
- if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon .png ]]; then
324
- 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
323
+ if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo .png ]]; then
324
+ 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
325
325
fi
326
326
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
327
+ cd ${TEMPDIR}/unraid/templates/
327
328
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
328
- echo "Image is on the ignore list, skipping Unraid template upload"
329
+ echo "Image is on the ignore list, removing Unraid template"
330
+ git rm unraid/${CONTAINER_NAME}.xml || :
331
+ git commit -m 'Bot Removing Deprecated Unraid Template' || :
329
332
else
330
333
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
331
- cd ${TEMPDIR}/unraid/templates/
332
334
git add unraid/${CONTAINER_NAME}.xml
333
335
git commit -m 'Bot Updating Unraid Template'
334
- git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
335
336
fi
337
+ git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
336
338
fi
337
339
rm -Rf ${TEMPDIR}'''
338
340
script{
@@ -389,8 +391,21 @@ pipeline {
389
391
}
390
392
steps {
391
393
echo " Running on node: ${ NODE_NAME} "
392
- sh " docker build --no-cache --pull -t ${ IMAGE} :${ META_TAG} \
393
- --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
394
+ sh " docker build \
395
+ --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
396
+ --label \" org.opencontainers.image.authors=linuxserver.io\" \
397
+ --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-syncthing/packages\" \
398
+ --label \" org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-syncthing\" \
399
+ --label \" org.opencontainers.image.source=https://github.com/linuxserver/docker-syncthing\" \
400
+ --label \" org.opencontainers.image.version=${ EXT_RELEASE_CLEAN} -ls${ LS_TAG_NUMBER} \" \
401
+ --label \" org.opencontainers.image.revision=${ COMMIT_SHA} \" \
402
+ --label \" org.opencontainers.image.vendor=linuxserver.io\" \
403
+ --label \" org.opencontainers.image.licenses=GPL-3.0-only\" \
404
+ --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
405
+ --label \" org.opencontainers.image.title=Syncthing\" \
406
+ --label \" org.opencontainers.image.description=[Syncthing](https://syncthing.net) replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.\" \
407
+ --no-cache --pull -t ${ IMAGE} :${ META_TAG} \
408
+ --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
394
409
}
395
410
}
396
411
// Build MultiArch Docker containers for push to LS Repo
@@ -403,8 +418,21 @@ pipeline {
403
418
stage(' Build X86' ) {
404
419
steps {
405
420
echo " Running on node: ${ NODE_NAME} "
406
- sh " docker build --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} \
407
- --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
421
+ sh " docker build \
422
+ --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
423
+ --label \" org.opencontainers.image.authors=linuxserver.io\" \
424
+ --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-syncthing/packages\" \
425
+ --label \" org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-syncthing\" \
426
+ --label \" org.opencontainers.image.source=https://github.com/linuxserver/docker-syncthing\" \
427
+ --label \" org.opencontainers.image.version=${ EXT_RELEASE_CLEAN} -ls${ LS_TAG_NUMBER} \" \
428
+ --label \" org.opencontainers.image.revision=${ COMMIT_SHA} \" \
429
+ --label \" org.opencontainers.image.vendor=linuxserver.io\" \
430
+ --label \" org.opencontainers.image.licenses=GPL-3.0-only\" \
431
+ --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
432
+ --label \" org.opencontainers.image.title=Syncthing\" \
433
+ --label \" org.opencontainers.image.description=[Syncthing](https://syncthing.net) replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.\" \
434
+ --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} \
435
+ --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
408
436
}
409
437
}
410
438
stage(' Build ARMHF' ) {
@@ -417,8 +445,21 @@ pipeline {
417
445
sh ''' #! /bin/bash
418
446
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
419
447
'''
420
- sh " docker build --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} \
421
- --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
448
+ sh " docker build \
449
+ --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
450
+ --label \" org.opencontainers.image.authors=linuxserver.io\" \
451
+ --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-syncthing/packages\" \
452
+ --label \" org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-syncthing\" \
453
+ --label \" org.opencontainers.image.source=https://github.com/linuxserver/docker-syncthing\" \
454
+ --label \" org.opencontainers.image.version=${ EXT_RELEASE_CLEAN} -ls${ LS_TAG_NUMBER} \" \
455
+ --label \" org.opencontainers.image.revision=${ COMMIT_SHA} \" \
456
+ --label \" org.opencontainers.image.vendor=linuxserver.io\" \
457
+ --label \" org.opencontainers.image.licenses=GPL-3.0-only\" \
458
+ --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
459
+ --label \" org.opencontainers.image.title=Syncthing\" \
460
+ --label \" org.opencontainers.image.description=[Syncthing](https://syncthing.net) replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.\" \
461
+ --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} \
462
+ --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
422
463
sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
423
464
retry(5 ) {
424
465
sh " docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
@@ -438,8 +479,21 @@ pipeline {
438
479
sh ''' #! /bin/bash
439
480
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
440
481
'''
441
- sh " docker build --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
442
- --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
482
+ sh " docker build \
483
+ --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
484
+ --label \" org.opencontainers.image.authors=linuxserver.io\" \
485
+ --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-syncthing/packages\" \
486
+ --label \" org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-syncthing\" \
487
+ --label \" org.opencontainers.image.source=https://github.com/linuxserver/docker-syncthing\" \
488
+ --label \" org.opencontainers.image.version=${ EXT_RELEASE_CLEAN} -ls${ LS_TAG_NUMBER} \" \
489
+ --label \" org.opencontainers.image.revision=${ COMMIT_SHA} \" \
490
+ --label \" org.opencontainers.image.vendor=linuxserver.io\" \
491
+ --label \" org.opencontainers.image.licenses=GPL-3.0-only\" \
492
+ --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
493
+ --label \" org.opencontainers.image.title=Syncthing\" \
494
+ --label \" org.opencontainers.image.description=[Syncthing](https://syncthing.net) replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.\" \
495
+ --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
496
+ --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
443
497
sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
444
498
retry(5 ) {
445
499
sh " docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
@@ -746,11 +800,11 @@ pipeline {
746
800
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected] ","date": "'${GITHUB_DATE}'"}}' '''
747
801
echo " Pushing New release for Tag"
748
802
sh ''' #! /bin/bash
749
- curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\ (.*\\ ).$:\\ 1:' > releasebody.json
803
+ curl -H "Authorization: token ${GITHUB_TOKEN}" - s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\ (.*\\ ).$:\\ 1:' > releasebody.json
750
804
echo '{"tag_name":"'${META_TAG}'",\
751
805
"target_commitish": "master",\
752
806
"name": "'${META_TAG}'",\
753
- "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n**'${EXT_REPO}' Changes:**\\ n\\ n' > start
807
+ "body": "**LinuxServer Changes:**\\ n\\ n'${LS_RELEASE_NOTES}'\\ n\\ n **'${EXT_REPO}' Changes:**\\ n\\ n' > start
754
808
printf '","draft": false,"prerelease": false}' >> releasebody.json
755
809
paste -d'\\ 0' start releasebody.json > releasebody.json.done
756
810
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
@@ -775,7 +829,7 @@ pipeline {
775
829
set -e
776
830
TEMPDIR=$(mktemp -d)
777
831
docker pull ghcr.io/linuxserver/jenkins-builder:latest
778
- docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
832
+ docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
779
833
docker pull ghcr.io/linuxserver/readme-sync
780
834
docker run --rm=true \
781
835
-e DOCKERHUB_USERNAME=$DOCKERUSER \
0 commit comments