Jenkins build
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit

This commit is contained in:
2025-12-29 16:17:06 +08:00
parent fd32553d8a
commit e9684809bc

7
Jenkinsfile vendored
View File

@@ -123,8 +123,7 @@ pipeline {
''' '''
sh """ sh """
docker build -t ${DOCKER_IMAGE}:${imageTag} . docker build -t ${DOCKER_IMAGE}:latest
docker tag ${DOCKER_IMAGE}:${imageTag} ${DOCKER_IMAGE}:latest
""" """
} }
} }
@@ -133,7 +132,7 @@ pipeline {
stage('Push Docker Image') { stage('Push Docker Image') {
steps { steps {
script { script {
sh "docker push ${DOCKER_IMAGE}:${env.IMAGE_TAG}"
sh "docker push ${DOCKER_IMAGE}:latest" sh "docker push ${DOCKER_IMAGE}:latest"
} }
} }
@@ -236,7 +235,7 @@ def deployToEnvironment(String env) {
script { script {
// 根据环境设置部署参数 // 根据环境设置部署参数
def containerName = "${PROJECT_NAME}-${env}" def containerName = "${PROJECT_NAME}-${env}"
def imageToDeploy = "${DOCKER_IMAGE}:${env.IMAGE_TAG}" def imageToDeploy = "${DOCKER_IMAGE}:latest"
// 停止现有容器 // 停止现有容器
sh """ sh """