Jenkins test
gitea/vn-autoconfig/master There was a failure building this commit
Details
gitea/vn-autoconfig/master There was a failure building this commit
Details
This commit is contained in:
parent
c69177f461
commit
9df24b8357
|
@ -11,26 +11,11 @@ pipeline {
|
|||
setEnv()
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
environment {
|
||||
CREDS = credentials('docker-registry')
|
||||
}
|
||||
steps {
|
||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
||||
sh 'docker-compose build --parallel'
|
||||
sh 'docker-compose push'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
sh 'docker stack deploy --with-registry-auth --prune --compose-file docker-compose.yml $PROJECT_NAME'
|
||||
}
|
||||
dockerDeploy()
|
||||
}
|
||||
}
|
||||
post {
|
||||
|
|
|
@ -2,8 +2,5 @@ version: '3.7'
|
|||
services:
|
||||
main:
|
||||
image: registry.verdnatura.es/vn-autoconfig
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 80
|
||||
|
|
Loading…
Reference in New Issue