Skip to content

Commit c97cae2

Browse files
committed
pause cicd
1 parent 20e227d commit c97cae2

File tree

6 files changed

+244
-244
lines changed

6 files changed

+244
-244
lines changed

.github/workflows/build-image.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
name: Build Image User Service
1+
# name: Build Image User Service
22

3-
on:
4-
workflow_call:
5-
secrets:
6-
DOCKER_HUB_ACCESS_TOKEN:
7-
required: true
3+
# on:
4+
# workflow_call:
5+
# secrets:
6+
# DOCKER_HUB_ACCESS_TOKEN:
7+
# required: true
88

9-
jobs:
10-
build-image:
11-
name: Build and Push Docker Image
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v3
9+
# jobs:
10+
# build-image:
11+
# name: Build and Push Docker Image
12+
# runs-on: ubuntu-latest
13+
# steps:
14+
# - name: Checkout code
15+
# uses: actions/checkout@v3
1616

17-
- name: Setup JDK 17
18-
uses: actions/setup-java@v3
19-
with:
20-
distribution: 'corretto'
21-
java-version: 17
17+
# - name: Setup JDK 17
18+
# uses: actions/setup-java@v3
19+
# with:
20+
# distribution: 'corretto'
21+
# java-version: 17
2222

23-
- name: Login to Docker Hub
24-
uses: docker/login-action@v2
25-
with:
26-
username: datuits
27-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
23+
# - name: Login to Docker Hub
24+
# uses: docker/login-action@v2
25+
# with:
26+
# username: datuits
27+
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
2828

29-
- name: Build the application
30-
run: |
31-
mvn clean
32-
mvn -B package --file pom.xml
29+
# - name: Build the application
30+
# run: |
31+
# mvn clean
32+
# mvn -B package --file pom.xml
3333

34-
- name: Build and Push the docker image
35-
run: |
36-
docker build -t datuits/devops-user-service:latest .
37-
docker push datuits/devops-user-service:latest
34+
# - name: Build and Push the docker image
35+
# run: |
36+
# docker build -t datuits/devops-user-service:latest .
37+
# docker push datuits/devops-user-service:latest
Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
name: Continuous Deployment for User Service
2-
3-
on:
4-
workflow_run:
5-
workflows: ["Continuous Integration for Comment Service"]
6-
types:
7-
- completed
8-
9-
env:
10-
PROJECT_ID: gke-project-423206
11-
CLUSTER_NAME: autopilot-cluster-1
12-
ZONE: us-central1
13-
14-
jobs:
15-
deploy:
16-
name: Deploy to GKE Autopilot
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v3
21-
22-
- name: Setup JDK 17
23-
uses: actions/setup-java@v3
24-
with:
25-
distribution: 'corretto'
26-
java-version: 17
27-
28-
- name: Build the application
29-
run: |
30-
mvn clean
31-
mvn -B package --file pom.xml
32-
33-
- name: Authenticate
34-
uses: google-github-actions/auth@v2
35-
with:
36-
credentials_json: ${{ secrets.GCP_SA_KEY }}
37-
38-
- name: Configure gcloud
39-
uses: google-github-actions/setup-gcloud@v2
40-
with:
41-
project_id: ${{ env.PROJECT_ID }}
42-
install_components: 'gke-gcloud-auth-plugin'
43-
44-
- name: Set cluster context
45-
run: |
46-
gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.ZONE }} --project ${{ env.PROJECT_ID }}
47-
48-
- name: Apply Kubernetes manifests
49-
run: |
50-
kubectl apply -f resources.yaml
51-
52-
notifications:
53-
needs: deploy
54-
uses: ./.github/workflows/notifyCD.yaml
55-
secrets:
56-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL}}
1+
# name: Continuous Deployment for User Service
2+
3+
# on:
4+
# workflow_run:
5+
# workflows: ["Continuous Integration for Comment Service"]
6+
# types:
7+
# - completed
8+
9+
# env:
10+
# PROJECT_ID: gke-project-423206
11+
# CLUSTER_NAME: autopilot-cluster-1
12+
# ZONE: us-central1
13+
14+
# jobs:
15+
# deploy:
16+
# name: Deploy to GKE Autopilot
17+
# runs-on: ubuntu-latest
18+
# steps:
19+
# - name: Checkout code
20+
# uses: actions/checkout@v3
21+
22+
# - name: Setup JDK 17
23+
# uses: actions/setup-java@v3
24+
# with:
25+
# distribution: 'corretto'
26+
# java-version: 17
27+
28+
# - name: Build the application
29+
# run: |
30+
# mvn clean
31+
# mvn -B package --file pom.xml
32+
33+
# - name: Authenticate
34+
# uses: google-github-actions/auth@v2
35+
# with:
36+
# credentials_json: ${{ secrets.GCP_SA_KEY }}
37+
38+
# - name: Configure gcloud
39+
# uses: google-github-actions/setup-gcloud@v2
40+
# with:
41+
# project_id: ${{ env.PROJECT_ID }}
42+
# install_components: 'gke-gcloud-auth-plugin'
43+
44+
# - name: Set cluster context
45+
# run: |
46+
# gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.ZONE }} --project ${{ env.PROJECT_ID }}
47+
48+
# - name: Apply Kubernetes manifests
49+
# run: |
50+
# kubectl apply -f resources.yaml
51+
52+
# notifications:
53+
# needs: deploy
54+
# uses: ./.github/workflows/notifyCD.yaml
55+
# secrets:
56+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL}}

.github/workflows/main.yaml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
name: Continuous Integration for Comment Service
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
8-
jobs:
9-
testing:
10-
name: Testing Comment Service
11-
runs-on: ubuntu-latest
12-
steps:
13-
14-
- name: Checkout code
15-
uses: actions/checkout@v3
16-
17-
- name: Setup JDK 17
18-
uses: actions/setup-java@v3
19-
with:
20-
distribution: 'corretto'
21-
java-version: 17
22-
23-
- name: Set up MongoDB URI
24-
run: echo "SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/user-service" >> $GITHUB_ENV
25-
26-
- name: Unit Tests
27-
run: mvn -B test --file pom.xml
28-
29-
sonar-cloud-scan:
30-
needs: testing
31-
uses: ./.github/workflows/SonarQube.yaml
32-
secrets:
33-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
34-
35-
build-image:
36-
needs: testing
37-
uses: ./.github/workflows/build-image.yaml
38-
secrets:
39-
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
40-
41-
scan-image:
42-
needs: build-image
43-
uses: ./.github/workflows/scan-image.yaml
44-
45-
notify:
46-
needs: scan-image
47-
uses: ./.github/workflows/notifyCI.yaml
48-
secrets:
49-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1+
# name: Continuous Integration for Comment Service
2+
3+
# on:
4+
# push:
5+
# branches:
6+
# - main
7+
8+
# jobs:
9+
# testing:
10+
# name: Testing Comment Service
11+
# runs-on: ubuntu-latest
12+
# steps:
13+
14+
# - name: Checkout code
15+
# uses: actions/checkout@v3
16+
17+
# - name: Setup JDK 17
18+
# uses: actions/setup-java@v3
19+
# with:
20+
# distribution: 'corretto'
21+
# java-version: 17
22+
23+
# - name: Set up MongoDB URI
24+
# run: echo "SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/user-service" >> $GITHUB_ENV
25+
26+
# - name: Unit Tests
27+
# run: mvn -B test --file pom.xml
28+
29+
# sonar-cloud-scan:
30+
# needs: testing
31+
# uses: ./.github/workflows/SonarQube.yaml
32+
# secrets:
33+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
34+
35+
# build-image:
36+
# needs: testing
37+
# uses: ./.github/workflows/build-image.yaml
38+
# secrets:
39+
# DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
40+
41+
# scan-image:
42+
# needs: build-image
43+
# uses: ./.github/workflows/scan-image.yaml
44+
45+
# notify:
46+
# needs: scan-image
47+
# uses: ./.github/workflows/notifyCI.yaml
48+
# secrets:
49+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/notifyCD.yaml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
name: Send Slack Notification for User Service
1+
# name: Send Slack Notification for User Service
22

3-
on:
4-
workflow_call:
5-
secrets:
6-
SLACK_WEBHOOK_URL:
7-
required: true
3+
# on:
4+
# workflow_call:
5+
# secrets:
6+
# SLACK_WEBHOOK_URL:
7+
# required: true
88

9-
jobs:
10-
success_notifier:
11-
if: success()
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Send success notification on Slack
15-
uses: slackapi/[email protected]
16-
with:
17-
payload: |
18-
{
19-
"text": "The Continuous Deployment for User Service workflow has completed successfully."
20-
}
21-
env:
22-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9+
# jobs:
10+
# success_notifier:
11+
# if: success()
12+
# runs-on: ubuntu-latest
13+
# steps:
14+
# - name: Send success notification on Slack
15+
# uses: slackapi/[email protected]
16+
# with:
17+
# payload: |
18+
# {
19+
# "text": "The Continuous Deployment for User Service workflow has completed successfully."
20+
# }
21+
# env:
22+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
2323

24-
failure_notifier:
25-
if: failure()
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Send failure notification on Slack
29-
uses: slackapi/[email protected]
30-
with:
31-
payload: |
32-
{
33-
"text": "The Continuous Deployment for User Service workflow has failed."
34-
}
35-
env:
36-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
24+
# failure_notifier:
25+
# if: failure()
26+
# runs-on: ubuntu-latest
27+
# steps:
28+
# - name: Send failure notification on Slack
29+
# uses: slackapi/[email protected]
30+
# with:
31+
# payload: |
32+
# {
33+
# "text": "The Continuous Deployment for User Service workflow has failed."
34+
# }
35+
# env:
36+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)