refs #5739 feat: try run test back and front
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
51dcc402ef
commit
417503bd06
|
@ -42,8 +42,7 @@ pipeline {
|
|||
// 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-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"
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build back" //Front depends on this image
|
||||
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm db back"
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
|
|
|
@ -22,7 +22,8 @@ async function test() {
|
|||
isCI = true;
|
||||
|
||||
dataSources = JSON.parse(JSON.stringify(dataSources));
|
||||
|
||||
// dataSources.vn.port = 3308;
|
||||
// dataSources.vn.host = 'db';
|
||||
const bootOptions = {dataSources};
|
||||
const app = require('vn-loopback/server/server');
|
||||
await new Promise((resolve, reject) => {
|
||||
|
|
|
@ -19,11 +19,13 @@ services:
|
|||
context: db
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 3306:3306
|
||||
- 3308:3306
|
||||
front:
|
||||
image: front
|
||||
restart: always
|
||||
command: ["npx", "jest", "--ci", "--maxWorkers=2"]
|
||||
ports:
|
||||
- 5000:5000
|
||||
build:
|
||||
context: .
|
||||
dockerfile: front/Dockerfile.test
|
||||
|
@ -41,16 +43,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:
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
url: 'http://back:5000'
|
||||
url: 'back:5000'
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ async function test() {
|
|||
}
|
||||
|
||||
async function backendStatus() {
|
||||
log('Awaiting backend connection2...');
|
||||
log('Awaiting backend connection...');
|
||||
|
||||
const milliseconds = 1000;
|
||||
const maxAttempts = 10;
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"name": "RoutesMonitor",
|
||||
"base": "Loggable",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "routesMonitor"
|
||||
}
|
||||
"base": "VnModel",
|
||||
"mixins": {
|
||||
"Loggable": true
|
||||
},
|
||||
"properties": {
|
||||
"routeFk": {
|
||||
|
|
|
@ -3,5 +3,6 @@ docker-compose -p salix-test -f docker-compose.test.yml build --force-rm back
|
|||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm front
|
||||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm e2e
|
||||
docker-compose -p salix-test -f docker-compose.test.yml run e2e #--rm
|
||||
docker-compose -p salix-testing -f docker-compose.test.yml rm -s -v -f
|
||||
# docker-compose -p salix-test -f docker-compose.test.yml down
|
||||
# docker-compose -p salix-test -f docker-compose.test.yml rm
|
||||
|
|
Loading…
Reference in New Issue