From 85c1a97358f4236ff47cc380b1043587cd1604a1 Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Mon, 19 Apr 2021 09:53:32 +0200 Subject: [PATCH] Added Jenkinsfile 4 --- Jenkinsfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c656b72..8ee305b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,20 +48,24 @@ node { } - /*stage('Build Docker'){ + stage('Build Docker'){ - sh './dockerBuild.sh' + def customImage = docker.build("web/wannistesvorbei:${env.BRANCH_NAME}-${env.GIT_COMMIT}") } stage('Deploy'){ echo 'Push to Repo' - sh './dockerPushToRepo.sh' + docker.withRegistry('https://docker.sebse.de', 'docker-registry-robot') { - echo 'ssh to web server and tell it to pull new image' - sh 'ssh deploy@xxxxx.xxxxx.com running/xxxxxxx/dockerRun.sh' + /* Push the container to the custom Registry */ + customImage.push() + } - }*/ + /*echo 'ssh to web server and tell it to pull new image' + sh 'ssh deploy@xxxxx.xxxxx.com running/xxxxxxx/dockerRun.sh'*/ + + } stage('Cleanup'){