@@ -442,7 +442,8 @@ pipeline {
442
442
}
443
443
steps {
444
444
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 \
446
447
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
447
448
--label \" org.opencontainers.image.authors=linuxserver.io\" \
448
449
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-unifi-controller/packages\" \
@@ -455,7 +456,7 @@ pipeline {
455
456
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
456
457
--label \" org.opencontainers.image.title=Unifi-controller\" \
457
458
--label \" org.opencontainers.image.description=The [Unifi-controller](https://www.ubnt.com/enterprise/#unifi) software is a powerful, enterprise wireless software engine ideal for high-density client deployments requiring low latency and high uptime performance.\" \
458
- --no-cache --pull -t ${ IMAGE} :${ META_TAG} \
459
+ --no-cache --pull -t ${ IMAGE} :${ META_TAG} --platform=linux/amd64 \
459
460
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
460
461
}
461
462
}
@@ -472,7 +473,8 @@ pipeline {
472
473
stage(' Build X86' ) {
473
474
steps {
474
475
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 \
476
478
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
477
479
--label \" org.opencontainers.image.authors=linuxserver.io\" \
478
480
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-unifi-controller/packages\" \
@@ -485,7 +487,7 @@ pipeline {
485
487
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
486
488
--label \" org.opencontainers.image.title=Unifi-controller\" \
487
489
--label \" org.opencontainers.image.description=The [Unifi-controller](https://www.ubnt.com/enterprise/#unifi) software is a powerful, enterprise wireless software engine ideal for high-density client deployments requiring low latency and high uptime performance.\" \
488
- --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} \
490
+ --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} --platform=linux/amd64 \
489
491
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
490
492
}
491
493
}
@@ -499,7 +501,8 @@ pipeline {
499
501
sh ''' #! /bin/bash
500
502
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
501
503
'''
502
- sh " docker build \
504
+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
505
+ sh " docker buildx build \
503
506
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
504
507
--label \" org.opencontainers.image.authors=linuxserver.io\" \
505
508
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-unifi-controller/packages\" \
@@ -512,7 +515,7 @@ pipeline {
512
515
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
513
516
--label \" org.opencontainers.image.title=Unifi-controller\" \
514
517
--label \" org.opencontainers.image.description=The [Unifi-controller](https://www.ubnt.com/enterprise/#unifi) software is a powerful, enterprise wireless software engine ideal for high-density client deployments requiring low latency and high uptime performance.\" \
515
- --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
518
+ --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} --platform=linux/arm64 \
516
519
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
517
520
sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
518
521
retry(5 ) {
@@ -541,26 +544,12 @@ pipeline {
541
544
else
542
545
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
543
546
fi
544
- if [ "${DIST_IMAGE}" == "alpine" ]; then
545
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
546
- apk info -v > /tmp/package_versions.txt && \
547
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
548
- chmod 777 /tmp/package_versions.txt'
549
- elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
550
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
551
- apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
552
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
553
- chmod 777 /tmp/package_versions.txt'
554
- elif [ "${DIST_IMAGE}" == "fedora" ]; then
555
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
556
- rpm -qa > /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}" == "arch" ]; then
560
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
561
- pacman -Q > /tmp/package_versions.txt && \
562
- chmod 777 /tmp/package_versions.txt'
563
- fi
547
+ touch ${TEMPDIR}/package_versions.txt
548
+ docker run --rm \
549
+ -v /var/run/docker.sock:/var/run/docker.sock:ro \
550
+ -v ${TEMPDIR}:/tmp \
551
+ ghcr.io/anchore/syft:latest \
552
+ ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
564
553
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
565
554
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
566
555
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
0 commit comments