refs #5739 feat: try run test back and front
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
This commit is contained in:
parent
1319428085
commit
d0e64dff2b
|
@ -39,7 +39,8 @@ pipeline {
|
|||
NODE_ENV = ""
|
||||
}
|
||||
steps {
|
||||
sh "docker-compose -p salix-testing -f docker-compose.test.yml build --force-rm back db"
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --no-cache --force-rm db"
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm back front"
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
|
@ -52,19 +53,19 @@ pipeline {
|
|||
TZ = 'Europe/Madrid'
|
||||
}
|
||||
parallel {
|
||||
// stage('Frontend') {
|
||||
// steps {
|
||||
// sh "docker-compose -p salix-testing -f docker-compose.test.yml run --rm front"
|
||||
// }
|
||||
// }
|
||||
stage('Frontend') {
|
||||
steps {
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml run --rm front"
|
||||
}
|
||||
}
|
||||
stage('Backend') {
|
||||
steps {
|
||||
sh "docker-compose -p salix-testing -f docker-compose.test.yml run --rm back"
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml run --rm back"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('ClearTest') {
|
||||
stage('ClearTesting') {
|
||||
when { not { anyOf {
|
||||
branch 'test'
|
||||
branch 'master'
|
||||
|
@ -74,8 +75,8 @@ pipeline {
|
|||
TZ = 'Europe/Madrid'
|
||||
}
|
||||
steps {
|
||||
sh "docker-compose -p salix-testing -f docker-compose.test.yml down"
|
||||
sh "docker-compose -p salix-testing -f docker-compose.test.yml rm"
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml down"
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm"
|
||||
// sh "docker-compose -p salix-testing -f docker-compose.test.yml run --rm front"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,5 +56,6 @@ COPY modules modules
|
|||
COPY print print
|
||||
COPY storage storage
|
||||
|
||||
|
||||
# CMD ["npx", "gulp", "backOnly"]
|
||||
CMD ["node", "back/tests.js", "ci"]
|
||||
# CMD ["node", "back/tests.js", "ci"]
|
||||
|
|
|
@ -23,7 +23,7 @@ services:
|
|||
front:
|
||||
image: front
|
||||
restart: always
|
||||
command: ["npx", "jest", "--ci --maxWorkers=2"]
|
||||
command: ["npx", "jest", "--ci", "--maxWorkers=2"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: front/Dockerfile.test
|
||||
|
@ -32,6 +32,7 @@ services:
|
|||
back:
|
||||
image: back
|
||||
restart: always
|
||||
command: ["node", "back/tests.js", "ci"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: back/Dockerfile
|
||||
|
@ -40,16 +41,16 @@ services:
|
|||
- NODE_ENV
|
||||
depends_on:
|
||||
- db
|
||||
e2e:
|
||||
image: e2e
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: e2e/Dockerfile
|
||||
environment:
|
||||
- NODE_ENV
|
||||
depends_on:
|
||||
- front
|
||||
# e2e:
|
||||
# image: e2e
|
||||
# restart: always
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: e2e/Dockerfile
|
||||
# environment:
|
||||
# - NODE_ENV
|
||||
# depends_on:
|
||||
# - front
|
||||
|
||||
# networks:
|
||||
# stack-network:
|
||||
|
|
|
@ -3,13 +3,14 @@ EXPOSE 5000
|
|||
WORKDIR /salix
|
||||
|
||||
COPY front front
|
||||
RUN npm i -g jest
|
||||
# RUN npm i -g jest
|
||||
RUN cd front && npm install --ci
|
||||
|
||||
COPY modules modules
|
||||
COPY dist dist
|
||||
COPY jest-front.js ./
|
||||
COPY jest.front.config.js ./
|
||||
COPY babel.config.js ./
|
||||
COPY fileMock.js ./
|
||||
|
||||
COPY /front/gulpfile.js ./
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
"test:back": "sh runTestBack.sh",
|
||||
"test:e2e": "node e2e/helpers/tests.js",
|
||||
"test:front": "sh runTestFront.sh",
|
||||
"test:front:ci": "jest --ci --maxWorkers=2",
|
||||
"test:front:ci": "npx jest --ci --maxWorkers=2",
|
||||
"back": "nodemon --inspect -w modules ./node_modules/gulp/bin/gulp.js back",
|
||||
"lint": "eslint ./ --cache --ignore-pattern .gitignore",
|
||||
"docker": "docker build --progress=plain -t salix-db ./db",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm back db
|
||||
docker-compose -p salix-test -f docker-compose.test.yml run --rm back
|
||||
docker-compose -p salix-test -f docker-compose.test.yml down
|
||||
docker-compose -p salix-test -f docker-compose.test.yml rm
|
||||
# docker-compose -p salix-testing -f docker-compose.test.yml build --no-cache --force-rm db
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml build --force-rm back
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml run --rm back
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml down
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml rm
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm front
|
||||
docker-compose -p salix-test -f docker-compose.test.yml run --rm front
|
||||
docker-compose -p salix-test -f docker-compose.test.yml down
|
||||
docker-compose -p salix-test -f docker-compose.test.yml rm
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml build --force-rm front
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml run --rm front
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml down
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml rm
|
||||
|
|
Loading…
Reference in New Issue