2 Commits

Author SHA1 Message Date
joel d1a09bb88c Update Jenkinsfile
Update Jenkinsfile
2022-06-14 20:43:01 +02:00
joel f0785ff961 Update buildx 2022-06-14 20:43:00 +02:00
2 changed files with 13 additions and 14 deletions
Vendored
+1 -1
View File
@@ -141,7 +141,7 @@ pipeline {
}
steps {
// Buildx with push from cache
sh "./scripts/buildx --output=type=docker,dest=- . > myimage.tar
sh "./scripts/buildx"
}
}
}
+12 -13
View File
@@ -10,7 +10,7 @@ cd "${DIR}/.." || exit 1
# determine commit if not already set
if [ "$BUILD_COMMIT" == "" ]; then
BUILD_COMMIT=$(git log -n 1 --format=%h)
BUILD_COMMIT=$(git log -n 1 --format=%h)
fi
# Buildx Builder
@@ -18,19 +18,18 @@ docker buildx create --name "${BUILDX_NAME:-npm}" || echo
docker buildx use "${BUILDX_NAME:-npm}"
docker buildx build \
--build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \
--build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \
--build-arg GOPROXY="${GOPROXY:-}" \
--build-arg GOPRIVATE="${GOPRIVATE:-}" \
--platform linux/amd64,linux/arm64,linux/arm/7 \
--progress plain \
--pull \
-f docker/Dockerfile \
$@ \
.
--build-arg BUILD_VERSION="${BUILD_VERSION:-dev}" \
--build-arg BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
--build-arg BUILD_DATE="$(date '+%Y-%m-%d %T %Z')" \
--build-arg GOPROXY="${GOPROXY:-}" \
--build-arg GOPRIVATE="${GOPRIVATE:-}" \
--platform linux/amd64 \
--progress plain \
--pull \
-f docker/Dockerfile \
--output=type=docker,dest=- . > npm.tar
rc=$?
docker buildx rm "${BUILDX_NAME:-npm}"
echo -e "${BLUE} ${GREEN}Multiarch build Complete${RESET}"
exit $rc
exit $rc