@@ -452,7 +452,8 @@ pipeline {
452
452
}
453
453
steps {
454
454
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 \
456
457
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
457
458
--label \" org.opencontainers.image.authors=linuxserver.io\" \
458
459
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-domoticz/packages\" \
@@ -465,7 +466,7 @@ pipeline {
465
466
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
466
467
--label \" org.opencontainers.image.title=Domoticz\" \
467
468
--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 \
469
470
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
470
471
}
471
472
}
@@ -482,7 +483,8 @@ pipeline {
482
483
stage(' Build X86' ) {
483
484
steps {
484
485
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 \
486
488
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
487
489
--label \" org.opencontainers.image.authors=linuxserver.io\" \
488
490
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-domoticz/packages\" \
@@ -495,7 +497,7 @@ pipeline {
495
497
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
496
498
--label \" org.opencontainers.image.title=Domoticz\" \
497
499
--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 \
499
501
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
500
502
}
501
503
}
@@ -509,7 +511,8 @@ pipeline {
509
511
sh ''' #! /bin/bash
510
512
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
511
513
'''
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 \
513
516
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
514
517
--label \" org.opencontainers.image.authors=linuxserver.io\" \
515
518
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-domoticz/packages\" \
@@ -522,7 +525,7 @@ pipeline {
522
525
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
523
526
--label \" org.opencontainers.image.title=Domoticz\" \
524
527
--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 \
526
529
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
527
530
sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
528
531
retry(5 ) {
@@ -543,7 +546,8 @@ pipeline {
543
546
sh ''' #! /bin/bash
544
547
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
545
548
'''
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 \
547
551
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
548
552
--label \" org.opencontainers.image.authors=linuxserver.io\" \
549
553
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-domoticz/packages\" \
@@ -556,7 +560,7 @@ pipeline {
556
560
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
557
561
--label \" org.opencontainers.image.title=Domoticz\" \
558
562
--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 \
560
564
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
561
565
sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
562
566
retry(5 ) {
@@ -585,26 +589,12 @@ pipeline {
585
589
else
586
590
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
587
591
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
608
598
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
609
599
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
610
600
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
0 commit comments