build: 多tag构建

This commit is contained in:
CaptainB 2023-12-04 15:13:18 +08:00 committed by 刘瑞斌
parent e79f47611e
commit f76785d4e6
1 changed files with 2 additions and 6 deletions

8
Jenkinsfile vendored
View File

@ -84,9 +84,7 @@ pipeline {
cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/$library-${REVISION}.jar backend/app/target/dependency/BOOT-INF/lib/ cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/$library-${REVISION}.jar backend/app/target/dependency/BOOT-INF/lib/
done done
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-community --platform linux/amd64,linux/arm64 . --push docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-community -t metersphere/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-community --platform linux/amd64,linux/arm64 . --push
# 同步提交到 dockerhub
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t metersphere/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-community --platform linux/amd64,linux/arm64 . --push
''' '''
} }
} }
@ -113,9 +111,7 @@ pipeline {
cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/target/lib/* backend/app/target/dependency/BOOT-INF/lib/ cp -rf $LOCAL_REPOSITORY/io/metersphere/$library/${REVISION}/target/lib/* backend/app/target/dependency/BOOT-INF/lib/
done done
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-enterprise --platform linux/amd64,linux/arm64 . --push docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-enterprise -t metersphere/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-enterprise --platform linux/amd64,linux/arm64 . --push
# 同步提交到 dockerhub
docker --config /home/metersphere/.docker buildx build --no-cache --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t metersphere/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}-enterprise --platform linux/amd64,linux/arm64 . --push
''' '''
} }
} }