formation před 1 rokem
rodič
revize
2bb6477726
1 změnil soubory, kde provedl 4 přidání a 11 odebrání
  1. 4 11
      Jenkinsfile

+ 4 - 11
Jenkinsfile

@@ -32,17 +32,10 @@ node{
     
 	
 	
-    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=sqa_9980d9f6eac6a910947f1b55aaa280c93f02236b"
+     stage('Push Docker images to Nexus') {
+        withCredentials([usernamePassword(credentialsId: 'nexus', usernameVariable: 'admin', passwordVariable: 'azerty10')]) {
+            sh 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD nexus.foodgame.fr:8443'
+            sh 'docker-compose push'
         }
     }