pipleline去除push 后恢复
This commit is contained in:
parent
11403f5166
commit
a4194d4e0c
@ -20,6 +20,7 @@ pipeline {
|
||||
K8S_NAMESPACE = "azizi"
|
||||
K8S_DEPLOYMENT = "console"
|
||||
K8S_APP_LABEL = "console"
|
||||
BUILD_DIR = "/tmp/docker-build/console"
|
||||
}
|
||||
|
||||
stages {
|
||||
@ -39,12 +40,17 @@ pipeline {
|
||||
}
|
||||
stage('Build image') {
|
||||
steps {
|
||||
sh "docker build -f ${DOCKER_FILE} -t ${IMAGE_TAG} ${DOCKER_DIR}"
|
||||
sh """
|
||||
rm -rf ${BUILD_DIR}
|
||||
mkdir -p ${BUILD_DIR}/console-start/target
|
||||
cp ${DOCKER_FILE} ${BUILD_DIR}/Dockerfile-dev
|
||||
cp ${JAR_FILE} ${BUILD_DIR}/console-start/target/
|
||||
docker build -f ${BUILD_DIR}/Dockerfile-dev -t ${IMAGE_TAG} ${BUILD_DIR}
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Apply') {
|
||||
steps {
|
||||
sh "pwd && whoami"
|
||||
sh "kubectl -n ${K8S_NAMESPACE} rollout restart deployment/${K8S_DEPLOYMENT}"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user