From 53a1e9a88aa85c2b826701dbd89ffb091032b1a1 Mon Sep 17 00:00:00 2001 From: sgiller Date: Tue, 28 Aug 2018 13:21:26 +0200 Subject: [PATCH 1/3] feat(Jenkins): added Jenkinsfile --- Jenkinsfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..bae1fc02 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,18 @@ +node { + + stage('Clone repository') { + checkout scm + } + + stage('test and publish image'){ + script { + withDockerRegistry([ credentialsId: "docker1", url: "" ]) { + + def customImage = docker.build("denbicloud/cloud-portal-client") + customImage.inside {sh 'make test'} + /* Push the container to the custom Registry */ + customImage.push("dev") + } +} +} +} From b20501952df07b8e4c3cb8756dc3626778dee01c Mon Sep 17 00:00:00 2001 From: sgiller Date: Tue, 28 Aug 2018 13:41:31 +0200 Subject: [PATCH 2/3] fix(jenkinsfile): update Jenkinsfile --- Jenkinsfile | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bae1fc02..f95093eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,18 +1,17 @@ node { - + def image stage('Clone repository') { checkout scm } - stage('test and publish image'){ - script { - withDockerRegistry([ credentialsId: "docker1", url: "" ]) { - - def customImage = docker.build("denbicloud/cloud-portal-client") - customImage.inside {sh 'make test'} - /* Push the container to the custom Registry */ - customImage.push("dev") - } -} -} -} + stage('build image'){ + + sh 'docker rmi denbicloud/cloud-portal-client' + image = docker.build("denbicloud/cloud-portal-client") + } + stage('push image'){ + withDockerRegistry([ credentialsId: "docker1", url: "" ]) { + image.push("dev") + } + } + } From d0bc43622a78247f3cb18b4789669cd2fd30d45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Giller?= Date: Mon, 3 Sep 2018 13:28:35 +0200 Subject: [PATCH 3/3] test --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f95093eb..18d7f6fe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,6 @@ node { stage('build image'){ - sh 'docker rmi denbicloud/cloud-portal-client' image = docker.build("denbicloud/cloud-portal-client") } stage('push image'){