update gitea Jenkins file

add Jenkinsfile to sslproxy and add metrics.xai-corp.net.conf
This commit is contained in:
2018-10-28 22:53:46 -04:00
parent d8c685ccad
commit ce98660502
4 changed files with 39 additions and 19 deletions

View File

@@ -14,13 +14,10 @@ node('docker') {
stage('deploy') { stage('deploy') {
dir(workdir) { dir(workdir) {
sh '''export DOCKER_HOST=dkhost:2376 sh """
docker stack deploy --with-registry-auth --prune -c docker-compose.yml gitea
if docker stack ls | grep gitea; then
docker service update gitea_app docker service update gitea_app
else """
docker stack deploy -c docker-compose.yml gitea
fi'''
} }
} }

View File

@@ -0,0 +1,35 @@
node('docker') {
def app_name = 'sslproxy'
def app_port = '80'
def workdir = 'dockerfiles/services/sslproxy'
stage('prepare') {
git credentialsId: 'f1f58215-c789-44a2-9b72-50e4425cb061', url: 'ssh://git@git.xai-corp.net:10022/xai-corp.net/provisioning.git'
sh 'ls'
}
stage('build') {
dir(workdir) {
sh """
docker-compose -f docker-compose.yml build
"""
sh "DOCKER_HOST=dkhost:2376 docker-compose -f docker-compose-prod.yml pull"
}
}
stage('deploy') {
dir(workdir) {
sh """
docker stack deploy --with-registry-auth --prune -c docker-compose-prod.yml sslproxy
docker service update sslproxy_app
"""
}
}
stage('smoke tests') {
dir(workdir) {
sleep 10
sh "curl -If https://jenkins.xai-corp.net/metrics/ejkxeVI-iKLy968ji9AnfYmOHGIh1kYd3gA500JqrRxzTeenT06ynR5Dqo0CQplO/healthcheck"
}
}
}

View File

@@ -52,15 +52,3 @@ networks:
prod_ui: prod_ui:
external: external:
name: prod_ui name: prod_ui
# networks:
# - ingress
# - prod
#networks:
# ingress:
# external:
# name: ingress
# prod:
# external:
# name: prod