formation 3 лет назад
Родитель
Сommit
7f15c35eb6
2 измененных файлов с 15 добавлено и 14 удалено
  1. 13 13
      Jenkinsfile
  2. 2 1
      express-server/lib/db.js

+ 13 - 13
Jenkinsfile

@@ -135,19 +135,19 @@ node{
 	// 		imageExpress.push('latest')
 	// 	}*/
 	// }
-    stage('SonarQube analysis') 
-    {  
-         def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
-        withSonarQubeEnv('SonarQube') 
-        { 
-        // If you have configured more than one global server connection, you can specify its name
-        sh "${scannerHome}/bin/sonar-scanner  \
-        -Dsonar.projectKey=FatboarProject \
-        -Dsonar.sources=. \
-        -Dsonar.host.url=https://sonarqube.foodgame.fr \
-        -Dsonar.login=sqp_09ee9072c917af8212864baf0f75c950afc14c64"
-        }
-    }
+    // stage('SonarQube analysis') 
+    // {  
+    //      def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
+    //     withSonarQubeEnv('SonarQube') 
+    //     { 
+    //     // If you have configured more than one global server connection, you can specify its name
+    //     sh "${scannerHome}/bin/sonar-scanner  \
+    //     -Dsonar.projectKey=FatboarProject \
+    //     -Dsonar.sources=. \
+    //     -Dsonar.host.url=https://sonarqube.foodgame.fr \
+    //     -Dsonar.login=sqp_09ee9072c917af8212864baf0f75c950afc14c64"
+    //     }
+    // }
 	
 
     stage('Build Docker MEAN Stack(PreProduction Deployment)') 

+ 2 - 1
express-server/lib/db.js

@@ -10,7 +10,8 @@ const  config  = require('../config/config.json');
 var db = 'mongodb://mongodb-preprod.foodgame.fr:27017/mean-fatboar-db?w=majority&readPreference=primary&retryWrites=true&directConnection=true&ssl=false';
 //var mongoURI = 'mongodb://localhost:27017/my-db';
 //mongoose.set('useCreateIndex', true)
-mongoose.connect(db)
+mongoose.connect(db, {//useNewUrlParser: true,
+                        useUnifiedTopology: true, })
 .then(() => {
     console.log("Successfully connected to the database.");
 }).catch(err => {