Docker deploy

This commit is contained in:
Juan Ferrer 2021-04-29 23:51:42 +02:00
parent 3f9cc19944
commit c83e7108dd
2 changed files with 7 additions and 3 deletions

7
vars/dockerBuild.groovy Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env groovy
def call() {
sh 'docker-compose build --parallel'
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker-compose push'
}

View File

@ -1,8 +1,5 @@
#!/usr/bin/env groovy #!/usr/bin/env groovy
def call() { def call() {
sh 'docker-compose build --parallel'
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker-compose push'
sh 'docker stack deploy --with-registry-auth --prune --compose-file docker-compose.yml $PROJECT_NAME' sh 'docker stack deploy --with-registry-auth --prune --compose-file docker-compose.yml $PROJECT_NAME'
} }