diff --git a/Jenkinsfile b/Jenkinsfile index eea1f366..98f92ba1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,4 @@ +// This adds a quality gate that aborts the pipeline if the quality threshold isn't met pipeline { agent any @@ -15,8 +16,11 @@ pipeline { steps { withSonarQubeEnv('sonar-qube-1') { sh "${scannerHome}/bin/sonar-scanner" - } + } + timeout(time: 10, unit: 'MINUTES'){ + waitForQualityGate abortPipeline: true } } } -} \ No newline at end of file +} +}