You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/02/22 14:48:47 UTC

[incubator-plc4x] branch feature/sonarqube_build_breaker created (now a5d44d6)

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a change to branch feature/sonarqube_build_breaker
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.


      at a5d44d6  fail the build if the quality gate fails

This branch includes the following new commits:

     new a5d44d6  fail the build if the quality gate fails

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.

[incubator-plc4x] 01/01: fail the build if the quality gate fails

Posted by sr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch feature/sonarqube_build_breaker
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit a5d44d655d9a196e2e9da199f622987662a7a2d3
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Feb 22 15:48:43 2018 +0100

    fail the build if the quality gate fails
---
 Jenkinsfile | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index afaffe9..9567e8c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -103,7 +103,25 @@ pipeline {
             }
             steps {
                 echo 'Building'
-                sh 'mvn -P${JENKINS_PROFILE} sonar:sonar'
+                withSonarQubeEnv('Apache SonarQube Server') {
+                    sh 'mvn -P${JENKINS_PROFILE} sonar:sonar'
+                }
+            }
+        }
+
+        stage("Quality Gate") {
+            when {
+                branch 'master'
+            }
+            steps {
+                script {
+                    timeout(time: 1, unit: 'HOURS') {
+                        def qg = waitForQualityGate()
+                        if (qg.status != 'OK') {
+                            error "Pipeline aborted due to quality gate failure: ${qg.status}"
+                        }
+                    }
+                }
             }
         }
 

-- 
To stop receiving notification emails like this one, please contact
sruehl@apache.org.