- add jenkinsfile for portainer

This commit is contained in:
2018-10-27 09:23:41 -04:00
parent c263643d37
commit b72a506e7f

33
dockerfiles/services/ui/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,33 @@
node('docker') {
def workdir = 'dockerfiles/services/ui'
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_HOST=dkhost:2376 docker-compose -f docker-compose.yml pull"
}
}
stage('deploy') {
dir(workdir) {
sh '''export DOCKER_HOST=dkhost:2376
if docker stack ls | grep dkui; then
docker service update dkui_app
else
docker stack deploy -c docker-compose.yml dkui
fi'''
}
}
stage('smoke tests') {
dir(workdir) {
sleep 60
sh "curl -If http://dkhost:9000"
}
}
}