Ver Fonte

docker karma

formation há 2 anos atrás
pai
commit
bebccd7811
1 ficheiros alterados com 4 adições e 6 exclusões
  1. 4 6
      Jenkinsfile

+ 4 - 6
Jenkinsfile

@@ -86,14 +86,12 @@ node{
 
 
      stage('Test') 
      stage('Test') 
     {
     {
-		dir("${env.WORKSPACE}/angular-client"){ 
 		
 		
-         docker.image('trion/ng-cli-karma').inside {
-            sh 'npm install'
 				
 				
 	 		try
 	 		try
 			{
 			{
-				sh 'npm run test-ci'
+				sh 'docker run -v "$PWD":/app -w /app node:12.14.1 npm install'
+                sh 'docker run -v "$PWD":/app -w /app node:12.14.1 node_modules/karma/bin/karma start'
 			} 
 			} 
 			catch(err) 
 			catch(err) 
 			{
 			{
@@ -101,9 +99,9 @@ node{
 	 			junit 'target/surefire-reports/TESTS-TestSuite.xml/*.xml'
 	 			junit 'target/surefire-reports/TESTS-TestSuite.xml/*.xml'
 				throw err
 				throw err
 			}
 			}
-        }
+        
        
        
-	   } 
+	   
     //    dir("${env.WORKSPACE}/angular-client")
     //    dir("${env.WORKSPACE}/angular-client")
     //    {     
     //    {     
     //           sh 'npm install'
     //           sh 'npm install'