Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Commit 632bfc1

Browse files
Bot Updating Templated Files
1 parent a105d17 commit 632bfc1

File tree

1 file changed

+15
-26
lines changed

1 file changed

+15
-26
lines changed

Jenkinsfile

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ pipeline {
452452
}
453453
steps {
454454
echo "Running on node: ${NODE_NAME}"
455-
sh "docker build \
455+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
456+
sh "docker buildx build \
456457
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
457458
--label \"org.opencontainers.image.authors=linuxserver.io\" \
458459
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-booksonic-air/packages\" \
@@ -465,7 +466,7 @@ pipeline {
465466
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
466467
--label \"org.opencontainers.image.title=Booksonic-air\" \
467468
--label \"org.opencontainers.image.description=[Booksonic-air](http://booksonic.org) is a platform for accessing the audiobooks you own wherever you are. At the moment the platform consists of: * Booksonic Air - A server for streaming your audiobooks, successor to the original Booksonic server and based on Airsonic. * Booksonic App - An DSub based Android app for connection to Booksonic-Air servers.\" \
468-
--no-cache --pull -t ${IMAGE}:${META_TAG} \
469+
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
469470
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
470471
}
471472
}
@@ -482,7 +483,8 @@ pipeline {
482483
stage('Build X86') {
483484
steps {
484485
echo "Running on node: ${NODE_NAME}"
485-
sh "docker build \
486+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
487+
sh "docker buildx build \
486488
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
487489
--label \"org.opencontainers.image.authors=linuxserver.io\" \
488490
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-booksonic-air/packages\" \
@@ -495,7 +497,7 @@ pipeline {
495497
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
496498
--label \"org.opencontainers.image.title=Booksonic-air\" \
497499
--label \"org.opencontainers.image.description=[Booksonic-air](http://booksonic.org) is a platform for accessing the audiobooks you own wherever you are. At the moment the platform consists of: * Booksonic Air - A server for streaming your audiobooks, successor to the original Booksonic server and based on Airsonic. * Booksonic App - An DSub based Android app for connection to Booksonic-Air servers.\" \
498-
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
500+
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
499501
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
500502
}
501503
}
@@ -509,7 +511,8 @@ pipeline {
509511
sh '''#! /bin/bash
510512
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
511513
'''
512-
sh "docker build \
514+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
515+
sh "docker buildx build \
513516
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
514517
--label \"org.opencontainers.image.authors=linuxserver.io\" \
515518
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-booksonic-air/packages\" \
@@ -522,7 +525,7 @@ pipeline {
522525
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
523526
--label \"org.opencontainers.image.title=Booksonic-air\" \
524527
--label \"org.opencontainers.image.description=[Booksonic-air](http://booksonic.org) is a platform for accessing the audiobooks you own wherever you are. At the moment the platform consists of: * Booksonic Air - A server for streaming your audiobooks, successor to the original Booksonic server and based on Airsonic. * Booksonic App - An DSub based Android app for connection to Booksonic-Air servers.\" \
525-
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
528+
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
526529
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
527530
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
528531
retry(5) {
@@ -551,26 +554,12 @@ pipeline {
551554
else
552555
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
553556
fi
554-
if [ "${DIST_IMAGE}" == "alpine" ]; then
555-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
556-
apk info -v > /tmp/package_versions.txt && \
557-
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
558-
chmod 777 /tmp/package_versions.txt'
559-
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
560-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
561-
apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
562-
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
563-
chmod 777 /tmp/package_versions.txt'
564-
elif [ "${DIST_IMAGE}" == "fedora" ]; then
565-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
566-
rpm -qa > /tmp/package_versions.txt && \
567-
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
568-
chmod 777 /tmp/package_versions.txt'
569-
elif [ "${DIST_IMAGE}" == "arch" ]; then
570-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
571-
pacman -Q > /tmp/package_versions.txt && \
572-
chmod 777 /tmp/package_versions.txt'
573-
fi
557+
touch ${TEMPDIR}/package_versions.txt
558+
docker run --rm \
559+
-v /var/run/docker.sock:/var/run/docker.sock:ro \
560+
-v ${TEMPDIR}:/tmp \
561+
ghcr.io/anchore/syft:latest \
562+
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
574563
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
575564
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
576565
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then

0 commit comments

Comments
 (0)