diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index de45ef2..a7c73c2 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -74,7 +74,7 @@ jobs: with: context: ./kbazaar push: ${{ github.ref == 'refs/heads/main' }} - tags: ghcr.io/kbtg-kampus-classnest-se-java/workshop-:${{ env.GITHUB_SHA }} + tags: ghcr.io/kbtg-kampus-classnest-se-java/workshop-group-2:${{ env.GITHUB_SHA }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} @@ -95,7 +95,7 @@ jobs: git config user.email "root@aorjoa.link" - name: change image tag run: | - sed -i -E "s/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-.*$/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-:${GITHUB_SHA}/" infra/gitops/dev/deployment.yml + sed -i -E "s/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-group-2.*$/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-group-2:${GITHUB_SHA}/" infra/gitops/dev/deployment.yml git add infra/gitops/dev/deployment.yml git commit -m "[skip actions] 🤖 change docker image version to ${GITHUB_SHA}" - name: push changes diff --git a/.github/workflows/prod-cd.yaml b/.github/workflows/prod-cd.yaml index 7c4a90e..f8e5bb5 100644 --- a/.github/workflows/prod-cd.yaml +++ b/.github/workflows/prod-cd.yaml @@ -40,7 +40,7 @@ jobs: - name: change image tag run: | - sed -i -E "s/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-.*$/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-:${GITHUB_SHA}/" infra/gitops/prod/deployment.yml + sed -i -E "s/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-group-2.*$/ghcr.io\/kbtg-kampus-classnest-se-java\/workshop-group-2:${GITHUB_SHA}/" infra/gitops/prod/deployment.yml git add infra/gitops/prod/deployment.yml git commit -m "[skip actions] 🤖 change prd docker image version to ${{ inputs.deploy-tag }}" git pull --rebase diff --git a/README.md b/README.md index f0457c6..31bee0a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ KBazaar - Online Shopping Application (Workshop) ### STEP0: Initial Repository 1. ใช้ repository ที่เตรียมไว้ให้ตามกลุ่ม -2. Replace all `` ด้วย กลุ่มตัวเอง e.g `group-1` +2. Replace all `group-2` ด้วย กลุ่มตัวเอง e.g `group-1` 1. ทำการเพิ่มสมาชิกใน Github ของทีมเพื่อให้สามารถเข้าถึง Repository ได้ 1. ไปที่ Settings > Collaborators and teams > Manage access diff --git a/infra/gitops/dev/configmap.yml b/infra/gitops/dev/configmap.yml index 35bc95f..35062c1 100644 --- a/infra/gitops/dev/configmap.yml +++ b/infra/gitops/dev/configmap.yml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: app-config - namespace: -dev + namespace: group-2-dev data: - db.url: "jdbc:postgresql://db-postgresql-sgp1-09974-do-user-856918-0.c.db.ondigitalocean.com:25060/dev-" + db.url: "jdbc:postgresql://db-postgresql-sgp1-09974-do-user-856918-0.c.db.ondigitalocean.com:25060/dev-group-2" db.username: "doadmin" db.password: "AVNS_2KxS7zrsXbMV3L_4Eaj" enabled.feature.promotion.list.api: "true" diff --git a/infra/gitops/dev/deployment.yml b/infra/gitops/dev/deployment.yml index f990fdd..1a5b17c 100644 --- a/infra/gitops/dev/deployment.yml +++ b/infra/gitops/dev/deployment.yml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: api - namespace: -dev + namespace: group-2-dev spec: selector: matchLabels: @@ -15,7 +15,7 @@ spec: spec: containers: - name: kbazaar-api - image: ghcr.io/kbtg-kampus-classnest-se-java/workshop-:342b25a526f325f284259db8f71d8c866b2b527d + image: ghcr.io/kbtg-kampus-classnest-se-java/workshop-group-2:342b25a526f325f284259db8f71d8c866b2b527d imagePullPolicy: Always ports: - containerPort: 8080 diff --git a/infra/gitops/dev/ingress.yaml b/infra/gitops/dev/ingress.yaml index c60d455..a40b0c5 100644 --- a/infra/gitops/dev/ingress.yaml +++ b/infra/gitops/dev/ingress.yaml @@ -2,14 +2,14 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-website - namespace: -dev + namespace: group-2-dev annotations: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/rewrite-target: /$2 spec: ingressClassName: nginx rules: - - host: -dev.aorjoa.com + - host: group-2-dev.aorjoa.com http: paths: - path: / diff --git a/infra/gitops/dev/namespace.yml b/infra/gitops/dev/namespace.yml index 3a040c8..13993d9 100644 --- a/infra/gitops/dev/namespace.yml +++ b/infra/gitops/dev/namespace.yml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: -dev \ No newline at end of file + name: group-2-dev \ No newline at end of file diff --git a/infra/gitops/dev/service.yml b/infra/gitops/dev/service.yml index 6871160..0f4017e 100644 --- a/infra/gitops/dev/service.yml +++ b/infra/gitops/dev/service.yml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: api - namespace: -dev + namespace: group-2-dev spec: ports: - port: 80 diff --git a/infra/gitops/prod/configmap.yml b/infra/gitops/prod/configmap.yml index d7140e8..b4b2dc4 100644 --- a/infra/gitops/prod/configmap.yml +++ b/infra/gitops/prod/configmap.yml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: app-config - namespace: -prod + namespace: group-2-prod data: - db.url: "jdbc:postgresql://db-postgresql-sgp1-09974-do-user-856918-0.c.db.ondigitalocean.com:25060/prod-" + db.url: "jdbc:postgresql://db-postgresql-sgp1-09974-do-user-856918-0.c.db.ondigitalocean.com:25060/prod-group-2" db.username: "doadmin" db.password: "AVNS_2KxS7zrsXbMV3L_4Eaj" enabled.feature.promotion.list.api: "true" \ No newline at end of file diff --git a/infra/gitops/prod/deployment.yml b/infra/gitops/prod/deployment.yml index a825c70..452230e 100644 --- a/infra/gitops/prod/deployment.yml +++ b/infra/gitops/prod/deployment.yml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: api - namespace: -prod + namespace: group-2-prod spec: selector: matchLabels: @@ -15,7 +15,7 @@ spec: spec: containers: - name: kbazaar-api - image: ghcr.io/kbtg-kampus-classnest-se-java/workshop-:342b25a526f325f284259db8f71d8c866b2b527d + image: ghcr.io/kbtg-kampus-classnest-se-java/workshop-group-2:342b25a526f325f284259db8f71d8c866b2b527d imagePullPolicy: Always ports: - containerPort: 8080 diff --git a/infra/gitops/prod/ingress.yaml b/infra/gitops/prod/ingress.yaml index 0097ff2..89435c0 100644 --- a/infra/gitops/prod/ingress.yaml +++ b/infra/gitops/prod/ingress.yaml @@ -2,14 +2,14 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-website - namespace: -prod + namespace: group-2-prod annotations: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/rewrite-target: /$2 spec: ingressClassName: nginx rules: - - host: -prod.aorjoa.com + - host: group-2-prod.aorjoa.com http: paths: - path: / diff --git a/infra/gitops/prod/namespace.yml b/infra/gitops/prod/namespace.yml index 5094a19..80fa891 100644 --- a/infra/gitops/prod/namespace.yml +++ b/infra/gitops/prod/namespace.yml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: -prod \ No newline at end of file + name: group-2-prod \ No newline at end of file diff --git a/infra/gitops/prod/service.yml b/infra/gitops/prod/service.yml index 2666072..599de75 100644 --- a/infra/gitops/prod/service.yml +++ b/infra/gitops/prod/service.yml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: api - namespace: -prod + namespace: group-2-prod spec: ports: - port: 80 diff --git a/kbazaar/build.gradle b/kbazaar/build.gradle index fa51abf..5652069 100644 --- a/kbazaar/build.gradle +++ b/kbazaar/build.gradle @@ -75,7 +75,7 @@ task("test-it", type: Test) { sonar { properties { property "sonar.gradle.skipCompile", "true" - property "sonar.projectKey", "" + property "sonar.projectKey", "group-2" property "sonar.token", System.getenv("SONAR_TOKEN") property "sonar.host.url", System.getenv("SONAR_HOST_URL") }