@@ -163,7 +163,7 @@ pipeline {
163163 env. GITLABIMAGE = ' registry.gitlab.com/linuxserver.io/' + env. LS_REPO + ' /' + env. CONTAINER_NAME
164164 env. QUAYIMAGE = ' quay.io/linuxserver.io/' + env. CONTAINER_NAME
165165 if (env. MULTIARCH == ' true' ) {
166- env. CI_TAGS = ' amd64-legacy-' + env. EXT_RELEASE_CLEAN + ' -ls' + env. LS_TAG_NUMBER + ' |arm32v7-legacy- ' + env . EXT_RELEASE_CLEAN + ' -ls ' + env . LS_TAG_NUMBER + ' | arm64v8-legacy-' + env. EXT_RELEASE_CLEAN + ' -ls' + env. LS_TAG_NUMBER
166+ env. CI_TAGS = ' amd64-legacy-' + env. EXT_RELEASE_CLEAN + ' -ls' + env. LS_TAG_NUMBER + ' |arm64v8-legacy-' + env. EXT_RELEASE_CLEAN + ' -ls' + env. LS_TAG_NUMBER
167167 } else {
168168 env. CI_TAGS = ' legacy-' + env. EXT_RELEASE_CLEAN + ' -ls' + env. LS_TAG_NUMBER
169169 }
@@ -186,7 +186,7 @@ pipeline {
186186 env. GITLABIMAGE = ' registry.gitlab.com/linuxserver.io/' + env. LS_REPO + ' /lsiodev-' + env. CONTAINER_NAME
187187 env. QUAYIMAGE = ' quay.io/linuxserver.io/lsiodev-' + env. CONTAINER_NAME
188188 if (env. MULTIARCH == ' true' ) {
189- env. CI_TAGS = ' amd64-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' |arm32v7-legacy- ' + env . EXT_RELEASE_CLEAN + ' -pkg- ' + env . PACKAGE_TAG + ' -dev- ' + env . COMMIT_SHA + ' | arm64v8-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA
189+ env. CI_TAGS = ' amd64-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' |arm64v8-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA
190190 } else {
191191 env. CI_TAGS = ' legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA
192192 }
@@ -209,7 +209,7 @@ pipeline {
209209 env. GITLABIMAGE = ' registry.gitlab.com/linuxserver.io/' + env. LS_REPO + ' /lspipepr-' + env. CONTAINER_NAME
210210 env. QUAYIMAGE = ' quay.io/linuxserver.io/lspipepr-' + env. CONTAINER_NAME
211211 if (env. MULTIARCH == ' true' ) {
212- env. CI_TAGS = ' amd64-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' -pr-' + env. PULL_REQUEST + ' |arm32v7-legacy- ' + env . EXT_RELEASE_CLEAN + ' -pkg- ' + env . PACKAGE_TAG + ' -dev- ' + env . COMMIT_SHA + ' -pr- ' + env . PULL_REQUEST + ' | arm64v8-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' -pr-' + env. PULL_REQUEST
212+ env. CI_TAGS = ' amd64-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' -pr-' + env. PULL_REQUEST + ' |arm64v8-legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' -pr-' + env. PULL_REQUEST
213213 } else {
214214 env. CI_TAGS = ' legacy-' + env. EXT_RELEASE_CLEAN + ' -pkg-' + env. PACKAGE_TAG + ' -dev-' + env. COMMIT_SHA + ' -pr-' + env. PULL_REQUEST
215215 }
@@ -515,44 +515,6 @@ pipeline {
515515 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
516516 }
517517 }
518- stage(' Build ARMHF' ) {
519- agent {
520- label ' ARMHF'
521- }
522- steps {
523- echo " Running on node: ${ NODE_NAME} "
524- echo ' Logging into Github'
525- sh ''' #! /bin/bash
526- echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
527- '''
528- sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.armhf"
529- sh " docker buildx build \
530- --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
531- --label \" org.opencontainers.image.authors=linuxserver.io\" \
532- --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-wireguard/packages\" \
533- --label \" org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-wireguard\" \
534- --label \" org.opencontainers.image.source=https://github.com/linuxserver/docker-wireguard\" \
535- --label \" org.opencontainers.image.version=${ EXT_RELEASE_CLEAN} -ls${ LS_TAG_NUMBER} \" \
536- --label \" org.opencontainers.image.revision=${ COMMIT_SHA} \" \
537- --label \" org.opencontainers.image.vendor=linuxserver.io\" \
538- --label \" org.opencontainers.image.licenses=GPL-3.0-only\" \
539- --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
540- --label \" org.opencontainers.image.title=Wireguard\" \
541- --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.\" \
542- --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} --platform=linux/arm/v7 \
543- --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
544- sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
545- retry(5 ) {
546- sh " docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
547- }
548- sh ''' #! /bin/bash
549- containers=$(docker ps -aq)
550- if [[ -n "${containers}" ]]; then
551- docker stop ${containers}
552- fi
553- docker system prune -af --volumes || : '''
554- }
555- }
556518 stage(' Build ARM64' ) {
557519 agent {
558520 label ' ARM64'
@@ -693,9 +655,7 @@ pipeline {
693655 set -e
694656 docker pull ghcr.io/linuxserver/ci:latest
695657 if [ "${MULTIARCH}" == "true" ]; then
696- docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
697658 docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
698- docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
699659 docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
700660 fi
701661 docker run --rm \
@@ -798,58 +758,54 @@ pipeline {
798758 echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
799759 echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
800760 if [ "${CI}" == "false" ]; then
801- docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
802- docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
803761 docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
804762 docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
805763 fi
806764 for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
807765 docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
808766 docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-legacy
809767 docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
810- docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
811- docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-legacy
812- docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
813768 docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
814769 docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-legacy
815770 docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
816771 if [ -n "${SEMVER}" ]; then
817772 docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
818- docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
819773 docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
820774 fi
821775 docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
822776 docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
823777 docker push ${MANIFESTIMAGE}:amd64-legacy
824- docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
825- docker push ${MANIFESTIMAGE}:arm32v7-legacy
826- docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
827778 docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
828779 docker push ${MANIFESTIMAGE}:arm64v8-legacy
829780 docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
830781 if [ -n "${SEMVER}" ]; then
831782 docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
832- docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
833783 docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
834784 fi
835785 docker manifest push --purge ${MANIFESTIMAGE}:legacy || :
836- docker manifest create ${MANIFESTIMAGE}:legacy ${MANIFESTIMAGE}:amd64-legacy ${MANIFESTIMAGE}:arm32v7-legacy ${MANIFESTIMAGE}:arm64v8-legacy
837- docker manifest annotate ${MANIFESTIMAGE}:legacy ${MANIFESTIMAGE}:arm32v7-legacy --os linux --arch arm
786+ docker manifest create ${MANIFESTIMAGE}:legacy ${MANIFESTIMAGE}:amd64-legacy ${MANIFESTIMAGE}:arm64v8-legacy
838787 docker manifest annotate ${MANIFESTIMAGE}:legacy ${MANIFESTIMAGE}:arm64v8-legacy --os linux --arch arm64 --variant v8
839788 docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
840- docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
841- docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
789+ docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
842790 docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
843791 docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
844- docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
845- docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
792+ docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
846793 docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
847794 if [ -n "${SEMVER}" ]; then
848795 docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
849- docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
850- docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
796+ docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
851797 docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
852798 fi
799+ token=$(curl -sX GET "https://ghcr.io/token?scope=repository%3Alinuxserver%2F${CONTAINER_NAME}%3Apull" | jq -r '.token')
800+ digest=$(curl -s \
801+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
802+ --header "Authorization: Bearer ${token}" \
803+ "https://ghcr.io/v2/linuxserver/${CONTAINER_NAME}/manifests/arm32v7-legacy")
804+ if [[ $(echo "$digest" | jq -r '.layers') != "null" ]]; then
805+ docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-legacy || :
806+ docker manifest create ${MANIFESTIMAGE}:arm32v7-legacy ${MANIFESTIMAGE}:amd64-legacy
807+ docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-legacy
808+ fi
853809 docker manifest push --purge ${MANIFESTIMAGE}:legacy
854810 docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
855811 docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
0 commit comments