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