forked from BLC/sgeUpdated
Update sgeupdated pipeline v10
new code updated changes in fornt-end and back-end structure
This commit is contained in:
@@ -31,26 +31,27 @@ jobs:
|
|||||||
cd /home/ubuntu/sgeUpdated
|
cd /home/ubuntu/sgeUpdated
|
||||||
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
|
||||||
|
docker build --no-cache -t bgreen-backend .
|
||||||
cd ..
|
cd ..
|
||||||
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
|
||||||
if echo "${CHANGED_FILES}" | grep -q "sgeUpdated-frontend/package.json"; then
|
if echo "${CHANGED_FILES}" | grep -q "sge-frontend/package.json"; then
|
||||||
echo "package.json changed → installing dependencies"
|
echo "package.json changed → installing dependencies"
|
||||||
npm install
|
npm install
|
||||||
fi
|
fi
|
||||||
npm run build
|
npm run build
|
||||||
|
docker build --no-cache -t bgreen-frontend .
|
||||||
cd ..
|
cd ..
|
||||||
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