forked from BLC/sgeUpdated
Update sgeupdated pipeline v12
All checks were successful
sgeUpdated Smoke Test / smoke-test (push) Successful in 8s
All checks were successful
sgeUpdated Smoke Test / smoke-test (push) Successful in 8s
This commit is contained in:
@@ -33,35 +33,35 @@ jobs:
|
|||||||
git pull origin main
|
git pull origin main
|
||||||
|
|
||||||
# --- Backend ---
|
# --- Backend ---
|
||||||
if echo "${CHANGED_FILES}" | grep -q "sge-backend"; then
|
if echo "${CHANGED_FILES}" | grep -q "sge-backend"; then
|
||||||
echo "Backend changes detected..."
|
echo "Backend changes detected..."
|
||||||
cd sge-backend
|
cd sge-backend
|
||||||
mvn clean install
|
mvn clean install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Stop & remove old backend container (ignore errors if not exists)
|
# Stop & remove old backend container (ignore errors if not exists)
|
||||||
docker stop sgeupdated-backend-1 || true
|
docker stop sgeupdated-backend-1 || true
|
||||||
docker rm sgeupdated-backend-1 || true
|
docker rm sgeupdated-backend-1 || true
|
||||||
|
|
||||||
# Build Docker image and restart container
|
# Build Docker image and restart container
|
||||||
docker compose build --no-cache backend
|
docker compose build --no-cache backend
|
||||||
docker compose up -d --force-recreate backend
|
docker compose up -d --force-recreate backend
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Frontend ---
|
# --- Frontend ---
|
||||||
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
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Stop & remove old frontend container (ignore errors if not exists)
|
# Stop & remove old frontend container (ignore errors if not exists)
|
||||||
docker stop sgeupdated-frontend-1 || true
|
docker stop sgeupdated-frontend-1 || true
|
||||||
docker rm sgeupdated-frontend-1 || true
|
docker rm sgeupdated-frontend-1 || true
|
||||||
|
|
||||||
# Build Docker image and restart container
|
# Build Docker image and restart container
|
||||||
docker compose build --no-cache frontend
|
docker compose build --no-cache frontend
|
||||||
docker compose up -d --force-recreate frontend
|
docker compose up -d --force-recreate frontend
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user