mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	Run integration tests in parallel
This commit is contained in:
		
							
								
								
									
										35
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										35
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							| @@ -100,7 +100,9 @@ pipeline { | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		stage('Integration Tests Sqlite') { | ||||
| 		stage('Integration Tests') { | ||||
| 			parallel { | ||||
| 				stage('Sqlite') { | ||||
| 					steps { | ||||
| 						// Bring up a stack | ||||
| 						sh 'docker-compose up -d fullstack-sqlite' | ||||
| @@ -111,48 +113,49 @@ pipeline { | ||||
| 						sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-sqlite) 120' | ||||
|  | ||||
| 						// Run tests | ||||
| 				sh 'rm -rf test/results' | ||||
| 						sh 'rm -rf test/results-sqlite' | ||||
| 						sh 'docker-compose up cypress-sqlite' | ||||
| 						// Get results | ||||
| 				sh 'docker cp -L "$(docker-compose ps --all -q cypress-sqlite):/test/results" test/' | ||||
| 						sh 'docker cp -L "$(docker-compose ps --all -q cypress-sqlite):/test/results" test/results-sqlite' | ||||
| 					} | ||||
| 					post { | ||||
| 						always { | ||||
| 							// Dumps to analyze later | ||||
| 					sh 'mkdir -p debug' | ||||
| 					sh 'docker-compose logs fullstack-sqlite > debug/docker_fullstack_sqlite.log' | ||||
| 					sh 'docker-compose logs db > debug/docker_db.log' | ||||
| 							sh 'mkdir -p debug/sqlite' | ||||
| 							sh 'docker-compose logs fullstack-sqlite > debug/sqlite/docker_fullstack_sqlite.log' | ||||
| 							// Cypress videos and screenshot artifacts | ||||
| 					dir(path: 'test/results') { | ||||
| 							dir(path: 'test/results-sqlite') { | ||||
| 								archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml' | ||||
| 							} | ||||
| 					junit 'test/results/junit/*' | ||||
| 							junit 'test/results-sqlite/junit/*' | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 		stage('Integration Tests Mysql') { | ||||
| 				stage('Mysql') { | ||||
| 					steps { | ||||
| 						// Bring up a stack | ||||
| 						sh 'docker-compose up -d fullstack-mysql' | ||||
| 						sh './scripts/wait-healthy $(docker-compose ps --all -q fullstack-mysql) 120' | ||||
|  | ||||
| 						// Run tests | ||||
| 				sh 'rm -rf test/results' | ||||
| 						sh 'rm -rf test/results-mysql' | ||||
| 						sh 'docker-compose up cypress-mysql' | ||||
| 						// Get results | ||||
| 				sh 'docker cp -L "$(docker-compose ps --all -q cypress-mysql):/test/results" test/' | ||||
| 						sh 'docker cp -L "$(docker-compose ps --all -q cypress-mysql):/test/results" test/results-mysql' | ||||
| 					} | ||||
| 					post { | ||||
| 						always { | ||||
| 							// Dumps to analyze later | ||||
| 					sh 'mkdir -p debug' | ||||
| 					sh 'docker-compose logs fullstack-mysql > debug/docker_fullstack_mysql.log' | ||||
| 					sh 'docker-compose logs db > debug/docker_db.log' | ||||
| 							sh 'mkdir -p debug/mysql' | ||||
| 							sh 'docker-compose logs fullstack-mysql > debug/mysql/docker_fullstack_mysql.log' | ||||
| 							sh 'docker-compose logs db > debug/mysql/docker_db.log' | ||||
| 							// Cypress videos and screenshot artifacts | ||||
| 					dir(path: 'test/results') { | ||||
| 							dir(path: 'test/results-mysql') { | ||||
| 								archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml' | ||||
| 							} | ||||
| 					junit 'test/results/junit/*' | ||||
| 							junit 'test/results-mysql/junit/*' | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -14,7 +14,7 @@ services: | ||||
|       DB_MYSQL_PASSWORD: 'npm' | ||||
|       DB_MYSQL_NAME: 'npm' | ||||
|     volumes: | ||||
|       - npm_data:/data | ||||
|       - npm_data_mysql:/data | ||||
|     expose: | ||||
|       - 81 | ||||
|       - 80 | ||||
| @@ -37,7 +37,7 @@ services: | ||||
|       PGID: 1000 | ||||
|       DISABLE_IPV6: 'true' | ||||
|     volumes: | ||||
|       - npm_data:/data | ||||
|       - npm_data_sqlite:/data | ||||
|     expose: | ||||
|       - 81 | ||||
|       - 80 | ||||
| @@ -55,7 +55,7 @@ services: | ||||
|       MYSQL_USER: 'npm' | ||||
|       MYSQL_PASSWORD: 'npm' | ||||
|     volumes: | ||||
|       - db_data:/var/lib/mysql | ||||
|       - mysql_data:/var/lib/mysql | ||||
|  | ||||
|   cypress-mysql: | ||||
|     image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}" | ||||
| @@ -65,7 +65,7 @@ services: | ||||
|     environment: | ||||
|       CYPRESS_baseUrl: 'http://fullstack-mysql:81' | ||||
|     volumes: | ||||
|       - cypress-logs:/results | ||||
|       - cypress_logs_mysql:/results | ||||
|     command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json} | ||||
|  | ||||
|   cypress-sqlite: | ||||
| @@ -76,10 +76,12 @@ services: | ||||
|     environment: | ||||
|       CYPRESS_baseUrl: "http://fullstack-sqlite:81" | ||||
|     volumes: | ||||
|       - cypress-logs:/results | ||||
|       - cypress_logs_sqlite:/results | ||||
|     command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json} | ||||
|  | ||||
| volumes: | ||||
|   cypress-logs: | ||||
|   npm_data: | ||||
|   db_data: | ||||
|   cypress_logs_mysql: | ||||
|   cypress_logs_sqlite: | ||||
|   npm_data_mysql: | ||||
|   npm_data_sqlite: | ||||
|   mysql_data: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user