Skip to content

Commit b389289

Browse files
Bot Updating Templated Files
1 parent c4f5b08 commit b389289

File tree

1 file changed

+18
-28
lines changed

1 file changed

+18
-28
lines changed

Jenkinsfile

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ pipeline {
442442
}
443443
steps {
444444
echo "Running on node: ${NODE_NAME}"
445-
sh "docker build \
445+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
446+
sh "docker buildx build \
446447
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
447448
--label \"org.opencontainers.image.authors=linuxserver.io\" \
448449
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-wireguard/packages\" \
@@ -455,7 +456,7 @@ pipeline {
455456
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
456457
--label \"org.opencontainers.image.title=Wireguard\" \
457458
--label \"org.opencontainers.image.description=[WireGuard®](https://www.wireguard.com/) is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry.\" \
458-
--no-cache --pull -t ${IMAGE}:${META_TAG} \
459+
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
459460
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
460461
}
461462
}
@@ -472,7 +473,8 @@ pipeline {
472473
stage('Build X86') {
473474
steps {
474475
echo "Running on node: ${NODE_NAME}"
475-
sh "docker build \
476+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
477+
sh "docker buildx build \
476478
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
477479
--label \"org.opencontainers.image.authors=linuxserver.io\" \
478480
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-wireguard/packages\" \
@@ -485,7 +487,7 @@ pipeline {
485487
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
486488
--label \"org.opencontainers.image.title=Wireguard\" \
487489
--label \"org.opencontainers.image.description=[WireGuard®](https://www.wireguard.com/) is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry.\" \
488-
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \
490+
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
489491
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
490492
}
491493
}
@@ -499,7 +501,8 @@ pipeline {
499501
sh '''#! /bin/bash
500502
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
501503
'''
502-
sh "docker build \
504+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.armhf"
505+
sh "docker buildx build \
503506
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
504507
--label \"org.opencontainers.image.authors=linuxserver.io\" \
505508
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-wireguard/packages\" \
@@ -512,7 +515,7 @@ pipeline {
512515
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
513516
--label \"org.opencontainers.image.title=Wireguard\" \
514517
--label \"org.opencontainers.image.description=[WireGuard®](https://www.wireguard.com/) is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry.\" \
515-
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \
518+
--no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} --platform=linux/arm/v7 \
516519
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
517520
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}"
518521
retry(5) {
@@ -533,7 +536,8 @@ pipeline {
533536
sh '''#! /bin/bash
534537
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
535538
'''
536-
sh "docker build \
539+
sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
540+
sh "docker buildx build \
537541
--label \"org.opencontainers.image.created=${GITHUB_DATE}\" \
538542
--label \"org.opencontainers.image.authors=linuxserver.io\" \
539543
--label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-wireguard/packages\" \
@@ -546,7 +550,7 @@ pipeline {
546550
--label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \
547551
--label \"org.opencontainers.image.title=Wireguard\" \
548552
--label \"org.opencontainers.image.description=[WireGuard®](https://www.wireguard.com/) is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, but already it might be regarded as the most secure, easiest to use, and simplest VPN solution in the industry.\" \
549-
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
553+
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
550554
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
551555
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
552556
retry(5) {
@@ -575,26 +579,12 @@ pipeline {
575579
else
576580
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
577581
fi
578-
if [ "${DIST_IMAGE}" == "alpine" ]; then
579-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
580-
apk info -v > /tmp/package_versions.txt && \
581-
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
582-
chmod 777 /tmp/package_versions.txt'
583-
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
584-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
585-
apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
586-
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
587-
chmod 777 /tmp/package_versions.txt'
588-
elif [ "${DIST_IMAGE}" == "fedora" ]; then
589-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
590-
rpm -qa > /tmp/package_versions.txt && \
591-
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
592-
chmod 777 /tmp/package_versions.txt'
593-
elif [ "${DIST_IMAGE}" == "arch" ]; then
594-
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
595-
pacman -Q > /tmp/package_versions.txt && \
596-
chmod 777 /tmp/package_versions.txt'
597-
fi
582+
touch ${TEMPDIR}/package_versions.txt
583+
docker run --rm \
584+
-v /var/run/docker.sock:/var/run/docker.sock:ro \
585+
-v ${TEMPDIR}:/tmp \
586+
ghcr.io/anchore/syft:latest \
587+
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
598588
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
599589
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
600590
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then

0 commit comments

Comments
 (0)