ci: reuse buildx builder cache
This commit is contained in:
Vendored
+5
-7
@@ -14,7 +14,9 @@ pipeline {
|
||||
IMAGE_TAG = "${env.BUILD_ID}"
|
||||
DOCKER_CREDS = 'harbor_key'
|
||||
TARGET_PLATFORMS = 'linux/amd64,linux/arm64'
|
||||
BUILDER_NAME = "liverecorder-buildx-${env.BUILD_ID}"
|
||||
BUILDER_NAME = 'liverecorder-buildx'
|
||||
WEB_NODE_IMAGE = 'docker.m.daocloud.io/library/node:22-alpine'
|
||||
WEB_NGINX_IMAGE = 'docker.m.daocloud.io/library/nginx:1.27-alpine'
|
||||
|
||||
GIT_REPO_URL = 'https://gitea.nxsir.cn/nanxun/live_recorder.git'
|
||||
GIT_BRANCH = 'main'
|
||||
@@ -50,7 +52,6 @@ pipeline {
|
||||
set -e
|
||||
sudo docker buildx version
|
||||
sudo docker run --privileged --rm tonistiigi/binfmt --install arm64
|
||||
sudo docker buildx rm ${BUILDER_NAME} >/dev/null 2>&1 || true
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -94,7 +95,6 @@ pipeline {
|
||||
sudo docker buildx build \
|
||||
--builder ${BUILDER_NAME} \
|
||||
--platform ${TARGET_PLATFORMS} \
|
||||
--pull \
|
||||
--network host \
|
||||
--provenance=false \
|
||||
--build-arg HTTP_PROXY=http://192.168.5.200:7890 \
|
||||
@@ -134,11 +134,10 @@ pipeline {
|
||||
sudo docker buildx build \
|
||||
--builder ${BUILDER_NAME} \
|
||||
--platform ${TARGET_PLATFORMS} \
|
||||
--pull \
|
||||
--network host \
|
||||
--provenance=false \
|
||||
--build-arg NODE_IMAGE=docker.m.daocloud.io/library/node:22-alpine \
|
||||
--build-arg NGINX_IMAGE=docker.m.daocloud.io/library/nginx:1.27-alpine \
|
||||
--build-arg NODE_IMAGE=${WEB_NODE_IMAGE} \
|
||||
--build-arg NGINX_IMAGE=${WEB_NGINX_IMAGE} \
|
||||
--build-arg HTTP_PROXY=http://192.168.5.200:7890 \
|
||||
--build-arg HTTPS_PROXY=http://192.168.5.200:7890 \
|
||||
--build-arg NO_PROXY=127.0.0.1,localhost,reg.nxsir.cn,gitea.nxsir.cn \
|
||||
@@ -166,7 +165,6 @@ pipeline {
|
||||
always {
|
||||
sh """
|
||||
set +e
|
||||
sudo docker buildx rm ${BUILDER_NAME} >/dev/null 2>&1 || true
|
||||
sudo docker logout ${REGISTRY_URL} >/dev/null 2>&1 || true
|
||||
true
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user