From 2dad57501065253669c4f9c54ad7a71cacb33db9 Mon Sep 17 00:00:00 2001 From: Evan Yan <103996156+evanyan13@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:17:01 +0800 Subject: [PATCH] Fix CICD Errors (#129) * Fix Backend CI checks * Update backend cicd workflow * Install ESlint in github action * Install ESLint for Github Action * Configure BE CICD * Remove global eslint * Remove unneccessary checks * Update deployment config --- .github/workflows/backend-ci-workflow.yaml | 13 ------------- k8s/{start-k8s.sh => apply-k8s.sh} | 0 k8s/auth-service/auth-deployment.yaml | 2 +- .../code-execution-deployment.yaml | 2 +- .../collaboration-deployment.yaml | 2 +- k8s/gateway-service/gateway-deployment.yaml | 2 +- k8s/matching-service/matching-deployment.yaml | 2 +- k8s/question-service/question-deployment.yaml | 2 +- k8s/user-service/user-deployment.yaml | 2 +- k8s/y-websocket-service/y-websocket-deployment.yaml | 2 +- 10 files changed, 8 insertions(+), 21 deletions(-) rename k8s/{start-k8s.sh => apply-k8s.sh} (100%) diff --git a/.github/workflows/backend-ci-workflow.yaml b/.github/workflows/backend-ci-workflow.yaml index d2a5579290..3e4e30e9ca 100644 --- a/.github/workflows/backend-ci-workflow.yaml +++ b/.github/workflows/backend-ci-workflow.yaml @@ -40,16 +40,3 @@ jobs: npm run build cd ../.. done - - # Lint Check for Each Service - - name: Lint Each Service - run: | - npm install -g eslint - - services=("auth-service" "code-execution-service" "collaboration-service" "gateway-service" "matching-service" "question-service" "user-service" "y-websocket-service") - for service in "${services[@]}"; do - echo "Linting $service" - cd backend/$service - npm run lint - cd ../.. - done diff --git a/k8s/start-k8s.sh b/k8s/apply-k8s.sh similarity index 100% rename from k8s/start-k8s.sh rename to k8s/apply-k8s.sh diff --git a/k8s/auth-service/auth-deployment.yaml b/k8s/auth-service/auth-deployment.yaml index ba47036fea..299e11bb72 100644 --- a/k8s/auth-service/auth-deployment.yaml +++ b/k8s/auth-service/auth-deployment.yaml @@ -18,7 +18,7 @@ spec: containers: - name: auth-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/auth-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 3003 envFrom: diff --git a/k8s/code-execution-service/code-execution-deployment.yaml b/k8s/code-execution-service/code-execution-deployment.yaml index 4c474472f9..4ff145469a 100644 --- a/k8s/code-execution-service/code-execution-deployment.yaml +++ b/k8s/code-execution-service/code-execution-deployment.yaml @@ -18,7 +18,7 @@ spec: containers: - name: code-execution-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/code-execution-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 3006 envFrom: diff --git a/k8s/collaboration-service/collaboration-deployment.yaml b/k8s/collaboration-service/collaboration-deployment.yaml index 565fa2bc04..f71e572060 100644 --- a/k8s/collaboration-service/collaboration-deployment.yaml +++ b/k8s/collaboration-service/collaboration-deployment.yaml @@ -18,7 +18,7 @@ spec: containers: - name: collaboration-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/collaboration-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 3005 envFrom: diff --git a/k8s/gateway-service/gateway-deployment.yaml b/k8s/gateway-service/gateway-deployment.yaml index d8db9739e5..42beb41f93 100644 --- a/k8s/gateway-service/gateway-deployment.yaml +++ b/k8s/gateway-service/gateway-deployment.yaml @@ -16,7 +16,7 @@ spec: containers: - name: gateway-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/gateway-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 4000 env: diff --git a/k8s/matching-service/matching-deployment.yaml b/k8s/matching-service/matching-deployment.yaml index aa5a3efdd1..3c15a36627 100644 --- a/k8s/matching-service/matching-deployment.yaml +++ b/k8s/matching-service/matching-deployment.yaml @@ -16,7 +16,7 @@ spec: containers: - name: matching-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/matching-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 3004 envFrom: diff --git a/k8s/question-service/question-deployment.yaml b/k8s/question-service/question-deployment.yaml index 1e7a1d996d..b0952ad3b9 100644 --- a/k8s/question-service/question-deployment.yaml +++ b/k8s/question-service/question-deployment.yaml @@ -18,7 +18,7 @@ spec: containers: - name: question-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/question-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 3002 envFrom: diff --git a/k8s/user-service/user-deployment.yaml b/k8s/user-service/user-deployment.yaml index 6f69d3fda4..31eb434057 100644 --- a/k8s/user-service/user-deployment.yaml +++ b/k8s/user-service/user-deployment.yaml @@ -18,7 +18,7 @@ spec: containers: - name: user-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/user-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 3001 envFrom: diff --git a/k8s/y-websocket-service/y-websocket-deployment.yaml b/k8s/y-websocket-service/y-websocket-deployment.yaml index a7780220e1..66d0257898 100644 --- a/k8s/y-websocket-service/y-websocket-deployment.yaml +++ b/k8s/y-websocket-service/y-websocket-deployment.yaml @@ -18,7 +18,7 @@ spec: containers: - name: y-websocket-service image: asia-southeast1-docker.pkg.dev/peerprep-438213/peerprep/y-websocket-service:latest - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 4001 envFrom: