forked from Abdulbari/sgeUpdated
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:
@@ -38,7 +38,13 @@ jobs:
|
||||
cd sge-backend
|
||||
mvn clean install
|
||||
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
|
||||
fi
|
||||
|
||||
@@ -46,13 +52,16 @@ jobs:
|
||||
if echo "${CHANGED_FILES}" | grep -q "sge-frontend"; then
|
||||
echo "Frontend changes detected..."
|
||||
cd sge-frontend
|
||||
if echo "${CHANGED_FILES}" | grep -q "sge-frontend/package.json"; then
|
||||
echo "package.json changed → installing dependencies"
|
||||
|
||||
npm install
|
||||
fi
|
||||
npm run build
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user