Update sslproxy jenkinsfile to use xai command line
This commit is contained in:
35
dockerfiles/services/sslproxy/Jenkinsfile
vendored
35
dockerfiles/services/sslproxy/Jenkinsfile
vendored
@@ -28,12 +28,15 @@ pipeline {
|
||||
stage('build') {
|
||||
steps {
|
||||
dir(WORKDIR) {
|
||||
script {
|
||||
docker.withRegistry('http://dkregistry.xai-corp.net:5000', 'b11d7f1a-81ac-4daf-8842-56afc0d2370e') {
|
||||
def customImage = docker.build("dkregistry.xai-corp.net:5000/sslproxy:2.1", "-f ${DOCKERFILE} .")
|
||||
customImage.push()
|
||||
}
|
||||
}
|
||||
withDockerRegistry(credentialsId: 'b11d7f1a-81ac-4daf-8842-56afc0d2370e', url: 'http://dkregistry.xai-corp.net:5000') {
|
||||
// script {
|
||||
// docker.withRegistry('http://dkregistry.xai-corp.net:5000', 'b11d7f1a-81ac-4daf-8842-56afc0d2370e') {
|
||||
// def customImage = docker.build("dkregistry.xai-corp.net:5000/sslproxy:2.1", "-f ${DOCKERFILE} .")
|
||||
// customImage.push()
|
||||
// }
|
||||
// }
|
||||
sh "xai build"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,31 +45,15 @@ pipeline {
|
||||
steps {
|
||||
dir(WORKDIR) {
|
||||
withDockerRegistry(credentialsId: 'b11d7f1a-81ac-4daf-8842-56afc0d2370e', url: 'http://dkregistry.xai-corp.net:5000') {
|
||||
sh """
|
||||
export DOCKER_HOST=${DOCKER_HOST}
|
||||
docker stack deploy --with-registry-auth --prune -c docker-compose-prod.yml sslproxy
|
||||
(cd ../ && chmod +x ./scaleout.sh && ./scaleout.sh sslproxy_app 30)
|
||||
"""
|
||||
sh "xai deploy"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('smoke tests') {
|
||||
steps {
|
||||
dir(WORKDIR) {
|
||||
sleep 10
|
||||
sh "curl -If https://git.xai-corp.net/"
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
dir(WORKDIR) {
|
||||
withDockerRegistry(credentialsId: 'b11d7f1a-81ac-4daf-8842-56afc0d2370e', url: 'http://dkregistry.xai-corp.net:5000') {
|
||||
sh """
|
||||
export DOCKER_HOST=${DOCKER_HOST}
|
||||
docker service rollback sslproxy_app
|
||||
"""
|
||||
sh "xai rollback"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user