فهرست منبع

build de Fatboar

henri carmelo 10 ماه پیش
والد
کامیت
f665185fa7
1فایلهای تغییر یافته به همراه37 افزوده شده و 37 حذف شده
  1. 37 37
      Jenkinsfile

+ 37 - 37
Jenkinsfile

@@ -33,22 +33,22 @@ pipeline {
             }
         }
 
-        stage('SonarQube Analysis') {
-            steps {
-                script {
-                    def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
-                    withSonarQubeEnv('SonarQube') { // Nom du serveur SonarQube configuré dans Jenkins
-                        sh """
-                        ${scannerHome}/bin/sonar-scanner \
-                        -Dsonar.projectKey=FatboarProject-${env.BRANCH_NAME} \
-                        -Dsonar.sources=. \
-                        -Dsonar.host.url=https://sonarqube.foodgame.fr \
-                        -Dsonar.login=sqa_d81445ef2d3961cddf7e29e31c1aeb2505aacdbd
-                        """
-                    }
-                }
-            }
-        }
+        // stage('SonarQube Analysis') {
+        //     steps {
+        //         script {
+        //             def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
+        //             withSonarQubeEnv('SonarQube') { // Nom du serveur SonarQube configuré dans Jenkins
+        //                 sh """
+        //                 ${scannerHome}/bin/sonar-scanner \
+        //                 -Dsonar.projectKey=FatboarProject-${env.BRANCH_NAME} \
+        //                 -Dsonar.sources=. \
+        //                 -Dsonar.host.url=https://sonarqube.foodgame.fr \
+        //                 -Dsonar.login=sqa_d81445ef2d3961cddf7e29e31c1aeb2505aacdbd
+        //                 """
+        //             }
+        //         }
+        //     }
+        // }
 
         stage('Stop Containers') {
             steps {
@@ -69,34 +69,34 @@ pipeline {
             }
         }
 
-        stage('Push Docker Image (Nexus)') {
-            when {
-                branch 'master'
-            }
-            steps {
-                withDockerRegistry([credentialsId: 'nexus', url: 'https://nexus.foodgame.fr']) {
-                    script {
-                        def dockerImageName = 'workflow_jenkins_1'
-                        def dockerImageTag = 'latest'
-                        def nexusRepository = 'fatboar_repo'
-
-                        sh """
-                        docker tag ${dockerImageName}:${dockerImageTag} ${nexusRepository}/${dockerImageName}:${dockerImageTag}
-                        docker push ${nexusRepository}/${dockerImageName}:${dockerImageTag}
-                        """
-                    }
-                }
-            }
-        }
+        // stage('Push Docker Image (Nexus)') {
+        //     when {
+        //         branch 'master'
+        //     }
+        //     steps {
+        //         withDockerRegistry([credentialsId: 'nexus', url: 'https://nexus.foodgame.fr']) {
+        //             script {
+        //                 def dockerImageName = 'workflow_jenkins_1'
+        //                 def dockerImageTag = 'latest'
+        //                 def nexusRepository = 'fatboar_repo'
+
+        //                 sh """
+        //                 docker tag ${dockerImageName}:${dockerImageTag} ${nexusRepository}/${dockerImageName}:${dockerImageTag}
+        //                 docker push ${nexusRepository}/${dockerImageName}:${dockerImageTag}
+        //                 """
+        //             }
+        //         }
+        //     }
+        // }
     
         stage('Docker Registry Login, Pull, and Push') {
             when {
-                branch 'master'
+                branch 'dev'
             }
             steps {
                 script {
                     def registryUrl = 'nexus.foodgame.fr:8123'
-                    def imageName = 'sonarqube'
+                    def imageName = 'grafana/tns-db'
                     def imageVersion = 'latest'
                     
                     docker.withRegistry("https://${registryUrl}", 'nexus') {