Files
provisioning/dockerfiles/services/gitea/Jenkinsfile

52 lines
1.2 KiB
Groovy

pipeline {
def workdir = 'dockerfiles/services/gitea'
def docker_host = 'dkhost:2376'
agent { label 'docker' }
options {
buildDiscarder(logRotator(numToKeepStr: '2'))
}
triggers {
cron('@weekly')
}
stages {
stage('prepare') {
steps {
checkout scm
sh 'ls'
}
}
stage('build') {
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
../scaleout.sh gitea_app 180
"""
}
}
}
stage('smoke tests') {
steps {
dir(workdir) {
sleep 60
sh "curl -If http://dkhost:10080"
}
}
}
}
}