diff --git a/vars/dockerBuild.groovy b/vars/dockerBuild.groovy new file mode 100644 index 0000000..01ccac5 --- /dev/null +++ b/vars/dockerBuild.groovy @@ -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' +} diff --git a/vars/dockerDeploy.groovy b/vars/dockerDeploy.groovy index 616f5bd..cc84dbd 100644 --- a/vars/dockerDeploy.groovy +++ b/vars/dockerDeploy.groovy @@ -1,8 +1,5 @@ #!/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' sh 'docker stack deploy --with-registry-auth --prune --compose-file docker-compose.yml $PROJECT_NAME' }