Files
provisioning/dockerfiles/services/gitea/Jenkinsfile

48 lines
1.1 KiB
Groovy

pipeline {
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"
}
}
}
}
}