@@ -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-domoticz/packages\" \
@@ -465,7 +466,7 @@ pipeline {
465466 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
466467 --label \" org.opencontainers.image.title=Domoticz\" \
467468 --label \" org.opencontainers.image.description=[Domoticz](https://www.domoticz.com) is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device.\" \
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-domoticz/packages\" \
@@ -495,7 +497,7 @@ pipeline {
495497 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
496498 --label \" org.opencontainers.image.title=Domoticz\" \
497499 --label \" org.opencontainers.image.description=[Domoticz](https://www.domoticz.com) is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device.\" \
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.armhf"
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-domoticz/packages\" \
@@ -522,7 +525,7 @@ pipeline {
522525 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
523526 --label \" org.opencontainers.image.title=Domoticz\" \
524527 --label \" org.opencontainers.image.description=[Domoticz](https://www.domoticz.com) is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device.\" \
525- --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} \
528+ --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} --platform=linux/arm/v7 \
526529 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
527530 sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
528531 retry(5 ) {
@@ -543,7 +546,8 @@ pipeline {
543546 sh ''' #! /bin/bash
544547 echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
545548 '''
546- sh " docker build \
549+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
550+ sh " docker buildx build \
547551 --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
548552 --label \" org.opencontainers.image.authors=linuxserver.io\" \
549553 --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-domoticz/packages\" \
@@ -556,7 +560,7 @@ pipeline {
556560 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
557561 --label \" org.opencontainers.image.title=Domoticz\" \
558562 --label \" org.opencontainers.image.description=[Domoticz](https://www.domoticz.com) is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device.\" \
559- --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
563+ --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} --platform=linux/arm64 \
560564 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
561565 sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
562566 retry(5 ) {
@@ -585,26 +589,12 @@ pipeline {
585589 else
586590 LOCAL_CONTAINER=${IMAGE}:${META_TAG}
587591 fi
588- if [ "${DIST_IMAGE}" == "alpine" ]; then
589- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
590- apk info -v > /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}" == "ubuntu" ]; then
594- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
595- apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
596- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
597- chmod 777 /tmp/package_versions.txt'
598- elif [ "${DIST_IMAGE}" == "fedora" ]; then
599- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
600- rpm -qa > /tmp/package_versions.txt && \
601- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
602- chmod 777 /tmp/package_versions.txt'
603- elif [ "${DIST_IMAGE}" == "arch" ]; then
604- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
605- pacman -Q > /tmp/package_versions.txt && \
606- chmod 777 /tmp/package_versions.txt'
607- fi
592+ touch ${TEMPDIR}/package_versions.txt
593+ docker run --rm \
594+ -v /var/run/docker.sock:/var/run/docker.sock:ro \
595+ -v ${TEMPDIR}:/tmp \
596+ ghcr.io/anchore/syft:latest \
597+ ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
608598 NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
609599 echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
610600 if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
0 commit comments