DESKTOP-SMCIPAV\falko 4 ヶ月 前
コミット
6ceed00ccc
1 ファイル変更8 行追加5 行削除
  1. 8 5
      Jenkinsfile

+ 8 - 5
Jenkinsfile

@@ -44,21 +44,26 @@ pipeline {
   agent {
     docker {
       image 'cypress/browsers:node14.17.0-chrome91-ff89'
-      args '-u root:root'
+      args '-u root:root --shm-size=2g'
     }
   }
   environment {
     CHROME_BIN = '/usr/bin/google-chrome'
     NODE_OPTIONS = '--max-old-space-size=4096'
+    DISPLAY = ':99'
   }
   steps {
     dir('angular-client') {
       sh '''
+        echo "🔧 Configuration de l'environnement"
+        export DISPLAY=:99
+        Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
+
         echo "✅ Installation des dépendances"
         npm install --legacy-peer-deps
 
-        echo "✅ Lancement des tests"
-        npx ng test --no-watch --no-progress --browsers=ChromeHeadless
+        echo "🚀 Lancement des tests"
+        npx ng test --no-watch --no-progress --browsers=ChromeHeadless -- --no-sandbox --disable-web-security --disable-gpu --disable-dev-shm-usage
       '''
     }
   }
@@ -66,8 +71,6 @@ pipeline {
 
 
 
-
-
         // 3. Analyse SonarQube pour la qualité du code
         // stage('SonarQube Analysis') {
         //     steps {