From 580af0f3cb9107fb02837bc017315a6abb4f4516 Mon Sep 17 00:00:00 2001 From: Daphne Augier <35980232+daphneaugier@users.noreply.github.com> Date: Sat, 11 Apr 2020 18:02:34 +0200 Subject: [PATCH 1/8] Update Jenkinsfile --- Jenkinsfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cb030b09a..314f7b8f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,9 +20,7 @@ pipeline { } stage('Deploy') { when { - expression { - currentBuild.result == null || currentBuild.result == 'SUCCESS' - } + branch 'master' } steps { echo "DEPLOY!" From 85803b1dac023c46e339a595d764d1fde6b1965c Mon Sep 17 00:00:00 2001 From: Daphne Augier <35980232+daphneaugier@users.noreply.github.com> Date: Sat, 11 Apr 2020 18:05:37 +0200 Subject: [PATCH 2/8] now deploy is for production branch --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 314f7b8f1..b25333441 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { } stage('Deploy') { when { - branch 'master' + branch 'production' } steps { echo "DEPLOY!" From fff622deff9c9584ae47b4f19f7485a1b40e5edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sat, 11 Apr 2020 18:20:41 +0200 Subject: [PATCH 3/8] add email notification --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b25333441..d407fd2d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,11 +20,11 @@ pipeline { } stage('Deploy') { when { - branch 'production' + branch 'master' } steps { echo "DEPLOY!" -/* sh './mvnw deploy' */ + // sh './mvnw deploy' } } } @@ -35,6 +35,7 @@ pipeline { } success { echo 'I succeeeded!' + mail to: m.augier@me.com, subject: 'Build succeeded: $(JOB_NAME)' } unstable { echo 'I am unstable :/' From fcb00e698d1f3391d3039579b7cc1f8268a31109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sat, 11 Apr 2020 18:26:08 +0200 Subject: [PATCH 4/8] correct email syntax --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d407fd2d3..97f7ff220 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,9 @@ pipeline { } success { echo 'I succeeeded!' - mail to: m.augier@me.com, subject: 'Build succeeded: $(JOB_NAME)' + mail to: 'm.augier@me.com', + subject: 'Build succeeded: $(JOB_NAME)' + body: "Eveythink OK with ${env.BUILD_URL}\nSuccessful Pipeline: ${currentBuild.fullDisplayName}" } unstable { echo 'I am unstable :/' From e456711d6c7d0d8c2adbfb4df175d1842448152f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sat, 11 Apr 2020 18:28:05 +0200 Subject: [PATCH 5/8] come on! --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 97f7ff220..def0aec16 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { success { echo 'I succeeeded!' mail to: 'm.augier@me.com', - subject: 'Build succeeded: $(JOB_NAME)' + subject: 'Build succeeded: $(JOB_NAME)', body: "Eveythink OK with ${env.BUILD_URL}\nSuccessful Pipeline: ${currentBuild.fullDisplayName}" } unstable { From ec4ae3c058ec45d3ddc7a00aa00b46b225612880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sat, 11 Apr 2020 18:58:44 +0200 Subject: [PATCH 6/8] test #75896587 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index def0aec16..7ee9c3673 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { } stage('Deploy') { when { - branch 'master' + branch 'development' } steps { echo "DEPLOY!" From 284c61383353757792f4bf4ce4742ebddb5546c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sat, 11 Apr 2020 19:05:11 +0200 Subject: [PATCH 7/8] modif mail subject --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7ee9c3673..53cd089c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,8 +36,8 @@ pipeline { success { echo 'I succeeeded!' mail to: 'm.augier@me.com', - subject: 'Build succeeded: $(JOB_NAME)', - body: "Eveythink OK with ${env.BUILD_URL}\nSuccessful Pipeline: ${currentBuild.fullDisplayName}" + subject: "Successful Pipeline: ${currentBuild.fullDisplayName}", + body: "Eveythink OK with ${env.BUILD_URL}\n" } unstable { echo 'I am unstable :/' From 4b1f6b2edd97b42a2d57e62d751ee7904c92c07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sat, 11 Apr 2020 19:11:37 +0200 Subject: [PATCH 8/8] update reciptient emall --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 53cd089c6..97566aa84 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,5 @@ #!/usr/bin/env groovy + pipeline { agent any stages { @@ -24,18 +25,16 @@ pipeline { } steps { echo "DEPLOY!" - // sh './mvnw deploy' } } } post { always { echo 'One way or another, I have finished' - /* deleteDir() /* clean up our workspace */ } success { echo 'I succeeeded!' - mail to: 'm.augier@me.com', + mail to: 'daphne.augier@gmail.com', subject: "Successful Pipeline: ${currentBuild.fullDisplayName}", body: "Eveythink OK with ${env.BUILD_URL}\n" }