refs #5739 feat: try run test back
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2024-01-16 09:01:49 +01:00
parent 1351f303e1
commit 9bb0261897
6 changed files with 21 additions and 36 deletions

4
Jenkinsfile vendored
View File

@ -39,12 +39,8 @@ pipeline {
NODE_ENV = ""
}
steps {
// 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 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 build --force-rm db back"
// sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml up db"
}
}
stage('Test') {

View File

@ -2,7 +2,7 @@ version: "3.7"
services:
# node_modules:
# image: node:20-bullseye-slim
# command: npm install --ci
# command: sh -c "npm i gulp-cli && npm install --ci && npx gulp i"
# user: "${UID}:${GID}"
# working_dir: /salix
# volumes:
@ -32,7 +32,6 @@ services:
- ./front:/salix/front
- ./loopback:/salix/loopback
- ./node_modules:/salix/node_modules
back:
image: back
command: ["npx", "gulp", "backWatch"]

View File

@ -1,17 +1,5 @@
version: "3.7"
services:
# node_modules:
# image: node:20-bullseye-slim
# command: npm install --ci
# working_dir: /salix
# volumes:
# - .:/salix
# print:
# image: node:20-bullseye-slim
# # command: cd print && npm install --ci
# working_dir: /salix/print
# volumes:
# - ./print:/salix/print
db:
image: db:test
restart: always
@ -39,18 +27,13 @@ services:
- NODE_ENV
depends_on:
- db
# e2e:
# image: e2e
# restart: always
# build:
# context: .
# dockerfile: e2e/Dockerfile
# environment:
# - NODE_ENV
# depends_on:
# - front
# networks:
# stack-network:
# driver: host
e2e:
image: e2e
restart: always
build:
context: .
dockerfile: e2e/Dockerfile
environment:
- NODE_ENV
depends_on:
- front

View File

@ -1,3 +1,3 @@
module.exports = {
url: 'http://localhost:5000'
url: 'http://front:5000'
};

View File

@ -1,2 +1,7 @@
# docker run --rm -v $(pwd):/app -w /app node:20-bullseye-slim npm install
docker network create --driver=host salix-stack-network
sudo docker run --rm -it \
-w /salix \
-v $PWD/../salix:/salix \
node:20-bullseye \
npm i -g gulp-cli \
npm i \
gulp i

View File

@ -2,6 +2,8 @@ docker-compose -p salix-test -f docker-compose.test.yml build --force-rm db
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 up db back --no-recreate
docker-compose -p salix-test -f docker-compose.test.yml up front
docker-compose -p salix-test -f docker-compose.test.yml run e2e #--rm
docker-compose -p salix-test -f docker-compose.test.yml rm -s -v -f
# docker-compose -p salix-test -f docker-compose.test.yml down