|
|
@@ -137,24 +137,14 @@ node{
|
|
|
// }
|
|
|
stage('SonarQube analysis')
|
|
|
{
|
|
|
- def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
|
|
|
+ def scannerHome = tool 'SonarQube Scanner';
|
|
|
withSonarQubeEnv('SonarQube')
|
|
|
{
|
|
|
// If you have configured more than one global server connection, you can specify its name
|
|
|
sh "${scannerHome}/bin/sonar-scanner -Dsonar.host.url=https://sonarqube.foodgame.fr -Dsonar.login=sqp_09ee9072c917af8212864baf0f75c950afc14c64"
|
|
|
}
|
|
|
}
|
|
|
- // No need to occupy a node
|
|
|
- stage("Quality Gate"){
|
|
|
-
|
|
|
- timeout(time: 1, unit: 'HOURS') { // Just in case something goes wrong, pipeline will be killed after a timeout
|
|
|
- def qg = waitForQualityGate() // Reuse taskId previously collected by withSonarQubeEnv
|
|
|
-
|
|
|
- if (qg.status != 'OK') {
|
|
|
- error "Pipeline aborted due to quality gate failure: ${qg.status}"
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
|
|
|
stage('Build Docker MEAN Stack(PreProduction Deployment)')
|