Skip to content

Commit 9b10af9

Browse files
committed
pause cicd
1 parent 8a5c6eb commit 9b10af9

File tree

9 files changed

+350
-350
lines changed

9 files changed

+350
-350
lines changed

.github/workflows/ArgoCD.yaml

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
1-
name: Argo Continuous Deployment for Comment Service
1+
# name: Argo Continuous Deployment for Comment Service
22

3-
on:
4-
push:
5-
branches:
6-
- main
3+
# on:
4+
# push:
5+
# branches:
6+
# - main
77

8-
env:
9-
PROJECT_ID: devops-project-426109
10-
CLUSTER_NAME: autopilot-cluster-1
11-
ZONE: us-central1
8+
# env:
9+
# PROJECT_ID: devops-project-426109
10+
# CLUSTER_NAME: autopilot-cluster-1
11+
# ZONE: us-central1
1212

13-
jobs:
14-
deploy:
15-
name: Deploy to GKE Autopilot
16-
runs-on: ubuntu-latest
17-
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v3
13+
# jobs:
14+
# deploy:
15+
# name: Deploy to GKE Autopilot
16+
# runs-on: ubuntu-latest
17+
# steps:
18+
# - name: Checkout code
19+
# uses: actions/checkout@v3
2020

21-
- name: Setup JDK 17
22-
uses: actions/setup-java@v3
23-
with:
24-
distribution: 'corretto'
25-
java-version: 17
21+
# - name: Setup JDK 17
22+
# uses: actions/setup-java@v3
23+
# with:
24+
# distribution: 'corretto'
25+
# java-version: 17
2626

27-
- name: Authenticate
28-
uses: google-github-actions/auth@v2
29-
with:
30-
credentials_json: ${{ secrets.GCP_SA_KEY_2 }}
27+
# - name: Authenticate
28+
# uses: google-github-actions/auth@v2
29+
# with:
30+
# credentials_json: ${{ secrets.GCP_SA_KEY_2 }}
3131

32-
- name: Configure gcloud
33-
uses: google-github-actions/setup-gcloud@v2
34-
with:
35-
project_id: ${{ env.PROJECT_ID }}
36-
install_components: 'gke-gcloud-auth-plugin'
32+
# - name: Configure gcloud
33+
# uses: google-github-actions/setup-gcloud@v2
34+
# with:
35+
# project_id: ${{ env.PROJECT_ID }}
36+
# install_components: 'gke-gcloud-auth-plugin'
3737

38-
- name: Set cluster context
39-
run: |
40-
gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.ZONE }} --project ${{ env.PROJECT_ID }}
38+
# - name: Set cluster context
39+
# run: |
40+
# gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.ZONE }} --project ${{ env.PROJECT_ID }}
4141

42-
- name: Install ArgoCD CLI
43-
run: |
44-
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
45-
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
46-
rm argocd-linux-amd64
42+
# - name: Install ArgoCD CLI
43+
# run: |
44+
# curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
45+
# sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
46+
# rm argocd-linux-amd64
4747

48-
- name: Install ArgoCD in Kubernetes cluster
49-
run: |
50-
kubectl create namespace argocd || true
51-
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
48+
# - name: Install ArgoCD in Kubernetes cluster
49+
# run: |
50+
# kubectl create namespace argocd || true
51+
# kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
5252

53-
- name: Wait for ArgoCD server to be ready
54-
run: |
55-
kubectl wait --for=condition=available --timeout=1200s deployment/argocd-server -n argocd
53+
# - name: Wait for ArgoCD server to be ready
54+
# run: |
55+
# kubectl wait --for=condition=available --timeout=1200s deployment/argocd-server -n argocd
5656

57-
- name: Get ArgoCD initial admin password
58-
id: argocd_password
59-
run: |
60-
ARGOCD_PASSWORD=$(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.name}')
61-
echo "::set-output name=ARGOCD_PASSWORD::${ARGOCD_PASSWORD}"
57+
# - name: Get ArgoCD initial admin password
58+
# id: argocd_password
59+
# run: |
60+
# ARGOCD_PASSWORD=$(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.name}')
61+
# echo "::set-output name=ARGOCD_PASSWORD::${ARGOCD_PASSWORD}"
6262

63-
- name: Login to ArgoCD
64-
run: |
65-
argocd login --insecure --username admin --password ${{ steps.argocd_password.outputs.ARGOCD_PASSWORD }} --grpc-web argocd-server.argocd.svc.cluster.local:443
63+
# - name: Login to ArgoCD
64+
# run: |
65+
# argocd login --insecure --username admin --password ${{ steps.argocd_password.outputs.ARGOCD_PASSWORD }} --grpc-web argocd-server.argocd.svc.cluster.local:443
6666

67-
- name: Create ArgoCD application
68-
run: |
69-
argocd app create comment-service \
70-
--repo https://github.com/DevOps-Video-Sharing/CommentService \
71-
--path k8s \
72-
--dest-server https://kubernetes.default.svc \
73-
--dest-namespace default
67+
# - name: Create ArgoCD application
68+
# run: |
69+
# argocd app create comment-service \
70+
# --repo https://github.com/DevOps-Video-Sharing/CommentService \
71+
# --path k8s \
72+
# --dest-server https://kubernetes.default.svc \
73+
# --dest-namespace default
7474

75-
- name: Sync ArgoCD application
76-
run: |
77-
argocd app sync comment-service
75+
# - name: Sync ArgoCD application
76+
# run: |
77+
# argocd app sync comment-service
7878

79-
notify:
80-
if: always()
81-
needs: deploy
82-
uses: ./.github/workflows/notifyCD.yaml
83-
secrets:
84-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
79+
# notify:
80+
# if: always()
81+
# needs: deploy
82+
# uses: ./.github/workflows/notifyCD.yaml
83+
# secrets:
84+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/applyK8S.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: Apply Kubernetes manifests
1+
# name: Apply Kubernetes manifests
22

3-
on:
4-
workflow_call:
3+
# on:
4+
# workflow_call:
55

66

7-
jobs:
8-
apply-k8s:
9-
name: Apply Kubernetes manifests
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v3
7+
# jobs:
8+
# apply-k8s:
9+
# name: Apply Kubernetes manifests
10+
# runs-on: ubuntu-latest
11+
# steps:
12+
# - name: Checkout code
13+
# uses: actions/checkout@v3
1414

15-
- name: Setup JDK 17
16-
uses: actions/setup-java@v3
17-
with:
18-
distribution: 'corretto'
19-
java-version: 17
15+
# - name: Setup JDK 17
16+
# uses: actions/setup-java@v3
17+
# with:
18+
# distribution: 'corretto'
19+
# java-version: 17
2020

21-
- name: Apply Kubernetes manifests
22-
run: |
23-
kubectl apply -f ./.github/workflows/K8S
21+
# - name: Apply Kubernetes manifests
22+
# run: |
23+
# kubectl apply -f ./.github/workflows/K8S

.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 Comment Service
1+
# name: Build Image Comment 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-comment-service:latest .
37-
docker push datuits/devops-comment-service:latest
34+
# - name: Build and Push the docker image
35+
# run: |
36+
# docker build -t datuits/devops-comment-service:latest .
37+
# docker push datuits/devops-comment-service:latest
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
name: Continuous Deployment for Comment Service
1+
# name: Continuous Deployment for Comment Service
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
env:
8-
PROJECT_ID=gke-project-423206
9-
CLUSTER_NAME=autopilot-cluster-1
10-
ZONE=us-central1
3+
# on:
4+
# push:
5+
# branches:
6+
# - main
7+
# env:
8+
# PROJECT_ID=gke-project-423206
9+
# CLUSTER_NAME=autopilot-cluster-1
10+
# ZONE=us-central1
1111

12-
jobs:
13-
deploy:
14-
name: Deploy to GKE Autopilot
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v3
12+
# jobs:
13+
# deploy:
14+
# name: Deploy to GKE Autopilot
15+
# runs-on: ubuntu-latest
16+
# steps:
17+
# - name: Checkout code
18+
# uses: actions/checkout@v3
1919

20-
- name: Setup JDK 17
21-
uses: actions/setup-java@v3
22-
with:
23-
distribution: 'corretto'
24-
java-version: 17
20+
# - name: Setup JDK 17
21+
# uses: actions/setup-java@v3
22+
# with:
23+
# distribution: 'corretto'
24+
# java-version: 17
2525

26-
- name: Authenticate
27-
uses: google-github-actions/auth@v2
28-
with:
29-
credentials_json: ${{ secrets.GCP_SA_KEY }}
26+
# - name: Authenticate
27+
# uses: google-github-actions/auth@v2
28+
# with:
29+
# credentials_json: ${{ secrets.GCP_SA_KEY }}
3030

31-
- name: Configure gcloud
32-
uses: google-github-actions/setup-gcloud@v2
33-
with:
34-
project_id: ${{ env.PROJECT_ID }}
35-
install_components: 'gke-gcloud-auth-plugin'
31+
# - name: Configure gcloud
32+
# uses: google-github-actions/setup-gcloud@v2
33+
# with:
34+
# project_id: ${{ env.PROJECT_ID }}
35+
# install_components: 'gke-gcloud-auth-plugin'
3636

37-
- name: Set cluster context
38-
run: |
39-
gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.ZONE }} --project ${{ env.PROJECT_ID }}
37+
# - name: Set cluster context
38+
# run: |
39+
# gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.ZONE }} --project ${{ env.PROJECT_ID }}
4040

41-
- name: Apply Kubernetes manifests for application
42-
run: |
43-
kubectl apply -f resources.yaml
41+
# - name: Apply Kubernetes manifests for application
42+
# run: |
43+
# kubectl apply -f resources.yaml
4444

45-
notify:
46-
needs: deploy
47-
uses: ./.github/workflows/notifyCD.yaml
48-
secrets:
49-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
45+
# notify:
46+
# needs: deploy
47+
# uses: ./.github/workflows/notifyCD.yaml
48+
# secrets:
49+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5050

0 commit comments

Comments
 (0)