Jenkins build
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
This commit is contained in:
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
@@ -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 """
|
||||||
|
|||||||
Reference in New Issue
Block a user