save launch configs

This commit is contained in:
2019-11-07 22:19:43 -05:00
parent 2b1fdcc914
commit fa38ef0be2
5 changed files with 87 additions and 24 deletions

53
dockerfiles/services/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,53 @@
pipeline {
environment {
WORKDIR = 'dockerfiles/services'
DOCKER_HOST = 'dkhost:2376'
}
agent { label 'docker' }
options {
buildDiscarder(logRotator(numToKeepStr: '2'))
}
triggers {
cron('@weekly')
}
stages {
stage('prepare') {
steps {
checkout scm
sh 'ls'
}
}
stage('de') {
steps {
dir(WORKDIR) {
sh "DOCKER_HOST=${DOCKER_HOST} docker-compose -f docker-compose.yml pull"
}
}
}
stage('deploy') {
steps {
dir(WORKDIR) {
sh """
export DOCKER_HOST=${DOCKER_HOST}
docker stack deploy --with-registry-auth --prune -c docker-compose.yml gitea
(cd ../ && chmod +x ./scaleout.sh && ./scaleout.sh gitea_app 180)
"""
}
}
}
stage('smoke tests') {
steps {
dir(WORKDIR) {
sleep 60
sh "curl -If http://dkhost:10080"
}
}
}
}
}