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 = "" NODE_ENV = ""
} }
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-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 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"
} }
} }
stage('Test') { stage('Test') {

View File

@ -2,7 +2,7 @@ version: "3.7"
services: services:
# node_modules: # node_modules:
# image: node:20-bullseye-slim # 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}" # user: "${UID}:${GID}"
# working_dir: /salix # working_dir: /salix
# volumes: # volumes:
@ -32,7 +32,6 @@ services:
- ./front:/salix/front - ./front:/salix/front
- ./loopback:/salix/loopback - ./loopback:/salix/loopback
- ./node_modules:/salix/node_modules - ./node_modules:/salix/node_modules
back: back:
image: back image: back
command: ["npx", "gulp", "backWatch"] command: ["npx", "gulp", "backWatch"]

View File

@ -1,17 +1,5 @@
version: "3.7" version: "3.7"
services: 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: db:
image: db:test image: db:test
restart: always restart: always
@ -39,18 +27,13 @@ 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:
# stack-network:
# driver: host

View File

@ -1,3 +1,3 @@
module.exports = { 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 sudo docker run --rm -it \
docker network create --driver=host salix-stack-network -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 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 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 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 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 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 down