Update sgeupdated pipeline v12

a new update that fixed the docker files problem, it deletes the old ones then builds the new accordingly
This commit is contained in:
2025-08-30 02:56:08 +03:00
parent 37873ad091
commit e9a361489e

View File

@@ -38,7 +38,13 @@ jobs:
cd sge-backend cd sge-backend
mvn clean install mvn clean install
cd .. cd ..
docker build -t bgreen-backend ./sge-backend
# Stop & remove old backend container (ignore errors if not exists)
docker stop sgeupdated-backend-1 || true
docker rm sgeupdated-backend-1 || true
# Build Docker image and restart container
docker compose build --no-cache backend
docker compose up -d --force-recreate backend docker compose up -d --force-recreate backend
fi fi
@@ -46,13 +52,16 @@ jobs:
if echo "${CHANGED_FILES}" | grep -q "sge-frontend"; then if echo "${CHANGED_FILES}" | grep -q "sge-frontend"; then
echo "Frontend changes detected..." echo "Frontend changes detected..."
cd sge-frontend cd sge-frontend
if echo "${CHANGED_FILES}" | grep -q "sge-frontend/package.json"; then
echo "package.json changed → installing dependencies"
npm install npm install
fi
npm run build npm run build
cd .. cd ..
docker build -t bgreen-frontend ./sge-frontend
# Stop & remove old frontend container (ignore errors if not exists)
docker stop sgeupdated-frontend-1 || true
docker rm sgeupdated-frontend-1 || true
# Build Docker image and restart container
docker compose build --no-cache frontend
docker compose up -d --force-recreate frontend docker compose up -d --force-recreate frontend
fi fi