Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
almoghindi committed Jul 2, 2024
0 parents commit bdc4d29
Show file tree
Hide file tree
Showing 325 changed files with 75,451 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*.{cs,vb}]
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
dotnet_naming_rule.private_members_with_underscore.severity = suggestion

dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_style.prefix_underscore.capitalization = camel_case
dotnet_naming_style.prefix_underscore.required_prefix = _
22 changes: 22 additions & 0 deletions .github/workflows/apply-k8s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: apply-k8s

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'infra/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- run: kubectl apply -f infra/K8S && kubectl apply -f infra/prod-k8s

40 changes: 40 additions & 0 deletions .github/workflows/deploy-auction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-auction

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'src/AuctionService/**'

env:
REGISTRY_IMAGE: trycatchlearn/auction-svc
DOCKERFILE: src/AuctionService/Dockerfile
DEPLOYMENT_NAME: auction-svc

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- name: Restart kubernetes deployment
run: kubectl rollout restart deployment ${{ env.DEPLOYMENT_NAME }}

40 changes: 40 additions & 0 deletions .github/workflows/deploy-bid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-bid

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'src/BiddingService/**'

env:
REGISTRY_IMAGE: trycatchlearn/bid-svc
DOCKERFILE: src/BiddingService/Dockerfile
DEPLOYMENT_NAME: bid-svc

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- name: Restart kubernetes deployment
run: kubectl rollout restart deployment ${{ env.DEPLOYMENT_NAME }}

40 changes: 40 additions & 0 deletions .github/workflows/deploy-gateway.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-gateway

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'src/GatewayService/**'

env:
REGISTRY_IMAGE: trycatchlearn/gateway-svc
DOCKERFILE: src/GatewayService/Dockerfile
DEPLOYMENT_NAME: gateway-svc

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- name: Restart kubernetes deployment
run: kubectl rollout restart deployment ${{ env.DEPLOYMENT_NAME }}

28 changes: 28 additions & 0 deletions .github/workflows/deploy-identity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy-identity

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'src/IdentityService/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: src/IdentityService/Dockerfile
push: true
tags: trycatchlearn/identity-svc:latest

40 changes: 40 additions & 0 deletions .github/workflows/deploy-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-notify

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'src/NotificationService/**'

env:
REGISTRY_IMAGE: trycatchlearn/notify-svc
DOCKERFILE: src/NotificationService/Dockerfile
DEPLOYMENT_NAME: notify-svc

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- name: Restart kubernetes deployment
run: kubectl rollout restart deployment ${{ env.DEPLOYMENT_NAME }}

40 changes: 40 additions & 0 deletions .github/workflows/deploy-search.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-search

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'src/SearchService/**'

env:
REGISTRY_IMAGE: trycatchlearn/search-svc
DOCKERFILE: src/SearchService/Dockerfile
DEPLOYMENT_NAME: search-svc

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- name: Restart kubernetes deployment
run: kubectl rollout restart deployment ${{ env.DEPLOYMENT_NAME }}

40 changes: 40 additions & 0 deletions .github/workflows/deploy-webapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: deploy-webapp

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'frontend/web-app/**'

env:
REGISTRY_IMAGE: trycatchlearn/web-app
DOCKERFILE: frontend/web-app/Dockerfile
DEPLOYMENT_NAME: webapp

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}"
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY_IMAGE }}:latest
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig
run: doctl kubernetes cluster kubeconfig save carsties
- name: Restart kubernetes deployment
run: kubectl rollout restart deployment ${{ env.DEPLOYMENT_NAME }}

Loading

0 comments on commit bdc4d29

Please sign in to comment.