@@ -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-mysql-workbench/packages\" \
@@ -455,7 +456,7 @@ pipeline {
455456 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
456457 --label \" org.opencontainers.image.title=Mysql-workbench\" \
457458 --label \" org.opencontainers.image.description=[MySQL Workbench](https://www.mysql.com/products/workbench/) is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.\" \
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-mysql-workbench/packages\" \
@@ -485,7 +487,7 @@ pipeline {
485487 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
486488 --label \" org.opencontainers.image.title=Mysql-workbench\" \
487489 --label \" org.opencontainers.image.description=[MySQL Workbench](https://www.mysql.com/products/workbench/) is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.\" \
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-mysql-workbench/packages\" \
@@ -512,7 +515,7 @@ pipeline {
512515 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
513516 --label \" org.opencontainers.image.title=Mysql-workbench\" \
514517 --label \" org.opencontainers.image.description=[MySQL Workbench](https://www.mysql.com/products/workbench/) is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.\" \
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-mysql-workbench/packages\" \
@@ -546,7 +550,7 @@ pipeline {
546550 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
547551 --label \" org.opencontainers.image.title=Mysql-workbench\" \
548552 --label \" org.opencontainers.image.description=[MySQL Workbench](https://www.mysql.com/products/workbench/) is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.\" \
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