refs #5739 feat: try run test back and front
gitea/salix/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Alex Moreno 2024-01-15 14:54:13 +01:00
parent bd31b9f424
commit 40afa1083c
2 changed files with 13 additions and 17 deletions

6
Jenkinsfile vendored
View File

@ -40,8 +40,8 @@ pipeline {
} }
steps { steps {
// sh "docker network ls | grep testing-\${env.STACK_NAME} | awk '{print \$1}' | xargs -r docker network rm" // sh "docker network ls | grep testing-\${env.STACK_NAME} | awk '{print \$1}' | xargs -r docker network rm"
sh "docker network ls | grep testing-salix-5739 | awk '{print \$1}' | xargs -r docker network rm" // sh "docker network ls | grep testing-salix-5739 | awk '{print \$1}' | xargs -r docker network rm"
sh "docker network create testing-salix-5739-dockerrefactor_default" // sh "docker network create testing-salix-5739-dockerrefactor_default"
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm --stop" sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm --stop"
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm db back" sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm db back"
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml up db" sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml up db"
@ -80,7 +80,7 @@ pipeline {
} }
steps { steps {
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm -s -f" sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm -s -f"
// sh "docker-compose -p salix-testing -f docker-compose.test.yml run --rm front" sh "docker network rm testing-${env.STACK_NAME}_default"
} }
} }
stage('Build') { stage('Build') {

View File

@ -18,14 +18,10 @@ services:
build: build:
context: db context: db
dockerfile: Dockerfile dockerfile: Dockerfile
ports:
- 3308:3306
front: front:
image: front image: front
restart: always restart: always
command: ["npx", "jest", "--ci", "--maxWorkers=2"] command: ["npx", "jest", "--ci", "--maxWorkers=2"]
ports:
- 5000:5000
build: build:
context: . context: .
dockerfile: front/Dockerfile.test dockerfile: front/Dockerfile.test
@ -43,16 +39,16 @@ services:
- NODE_ENV - NODE_ENV
depends_on: depends_on:
- db - db
e2e: # e2e:
image: e2e # image: e2e
restart: always # restart: always
build: # build:
context: . # context: .
dockerfile: e2e/Dockerfile # dockerfile: e2e/Dockerfile
environment: # environment:
- NODE_ENV # - NODE_ENV
depends_on: # depends_on:
- front # - front
# networks: # networks:
# stack-network: # stack-network: