Skip to content

Commit bd68b1f

Browse files
author
RoopeshNair
committed
new workflows
1 parent e558a3d commit bd68b1f

10 files changed

+486
-1
lines changed

.github/.DS_Store

0 Bytes
Binary file not shown.
+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Dotnet player workflow
2+
3+
name: DotnetPlayer
4+
5+
on:
6+
push:
7+
paths:
8+
- Source/Services/RPSLS.DotNetPlayer.Api/**
9+
- .github/workflows/dotnet_player_cicd.yml
10+
- Deploy/helm/dotnet-player/**
11+
branches:
12+
- master
13+
14+
jobs:
15+
buildpush:
16+
runs-on: ubuntu-16.04
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Build the Docker image
20+
working-directory: Source/Services/RPSLS.DotNetPlayer.Api
21+
run: docker build . --file Dockerfile --tag ${{ secrets.ACR_NAME }}.azurecr.io/dotnet.player:gh-${{ github.sha }}
22+
- name: Login to Azure
23+
uses: azure/login@v1
24+
with:
25+
creds: ${{ secrets.AZURE_CREDENTIALS }}
26+
- name: Set Azure subscription
27+
run: |
28+
az account set -s ${{ secrets.AZURE_SUBSCRIPTION }}
29+
- name: Docker push
30+
run: |
31+
az acr login -n ${{ secrets.ACR_NAME }}
32+
docker push ${{ secrets.ACR_NAME }}.azurecr.io/dotnet.player:gh-${{ github.sha }}
33+
- name: Set AKS kubectl context
34+
uses: azure/aks-set-context@v1
35+
with:
36+
creds: '${{ secrets.AZURE_CREDENTIALS }}'
37+
cluster-name: ${{ secrets.CLUSTER_NAME }}
38+
resource-group: ${{ secrets.RESOURCE_GROUP }}
39+
- name: Set up Helm
40+
uses: azure/setup-helm@v1
41+
with:
42+
version: latest
43+
id: install
44+
- name: Helm repo add
45+
run: |
46+
#curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
47+
#chmod 700 get_helm.sh
48+
#./get_helm.sh
49+
az acr helm repo add -n ${{ secrets.ACR_NAME }}
50+
- name: Package Helm chart
51+
run: |
52+
helm package Deploy/helm/dotnet-player -d Deploy/helm/__charts --version 1.0.0-${{ github.sha }}
53+
- name: Upload chart to ACR
54+
run: |
55+
az acr helm push Deploy/helm/__charts/dotnet-player-1.0.0-${{ github.sha }}.tgz -n ${{ secrets.ACR_NAME }}
56+
- name: Generate config file
57+
shell: pwsh
58+
run: |
59+
az extension add --name application-insights
60+
Deploy/powershell/Generate-Config.ps1 -gvaluesTemplate gvalues.template.gh -resourceGroup ${{ secrets.RESOURCE_GROUP }} -outputFile _values-gh.yaml -aksHost ${{ secrets.AKS_HOST }} -resourceGroupAcr ${{ secrets.RESOURCE_GROUP_ACR }}
61+
- name: Install Helm Chart
62+
run: |
63+
helm repo update
64+
helm upgrade --install -f Deploy/powershell/_values-gh.yaml --set image.repository=${{ secrets.ACR_NAME }}.azurecr.io/dotnet.player --set image.tag=gh-${{ github.sha }} --set replicaCount=2 dotnet-player ${{ secrets.ACR_NAME }}/dotnet-player --version=1.0.0-${{ github.sha }}
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Game Manager Workflow, debug,,,
2+
3+
name: Game Manager
4+
5+
on:
6+
push:
7+
paths:
8+
- Source/Services/RPSLS.Game.Api/**
9+
- .github/workflows/game-manager_cicd.yml
10+
- Deploy/helm/game-api/**
11+
branches:
12+
- master
13+
14+
jobs:
15+
buildpush:
16+
runs-on: ubuntu-16.04
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Build the Docker image
20+
working-directory: Source/Services/RPSLS.Game.Api
21+
run: docker build . --file Dockerfile --tag ${{ secrets.ACR_NAME }}.azurecr.io/game.api:gh-${{ github.sha }}
22+
- name: Login to Azure
23+
uses: azure/login@v1
24+
with:
25+
creds: ${{ secrets.AZURE_CREDENTIALS }}
26+
- name: Set Azure subscription
27+
run: |
28+
az account set -s ${{ secrets.AZURE_SUBSCRIPTION }}
29+
- name: Docker push
30+
run: |
31+
az acr login -n ${{ secrets.ACR_NAME }}
32+
docker push ${{ secrets.ACR_NAME }}.azurecr.io/game.api:gh-${{ github.sha }}
33+
- name: Set AKS kubectl context
34+
uses: azure/aks-set-context@v1
35+
with:
36+
creds: '${{ secrets.AZURE_CREDENTIALS }}'
37+
cluster-name: ${{ secrets.CLUSTER_NAME }}
38+
resource-group: ${{ secrets.RESOURCE_GROUP }}
39+
- name: Set up Helm
40+
uses: azure/setup-helm@v1
41+
with:
42+
version: latest
43+
id: install
44+
- name: Helm repo add
45+
run: |
46+
#curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
47+
#chmod 700 get_helm.sh
48+
#./get_helm.sh
49+
az acr helm repo add -n ${{ secrets.ACR_NAME }}
50+
- name: Package Helm chart
51+
run: |
52+
helm package Deploy/helm/game-api -d Deploy/helm/__charts --version 1.0.0-${{ github.sha }}
53+
- name: Upload chart to ACR
54+
run: |
55+
az acr helm push Deploy/helm/__charts/game-api-1.0.0-${{ github.sha }}.tgz -n ${{ secrets.ACR_NAME }}
56+
- name: Generate config file
57+
shell: pwsh
58+
run: |
59+
az extension add --name application-insights
60+
Deploy/powershell/Generate-Config.ps1 -gvaluesTemplate gvalues.template.gh -resourceGroup ${{ secrets.RESOURCE_GROUP }} -outputFile _values-gh.yaml -sslSupport custom -aksHost ${{ secrets.AKS_HOST }} -resourceGroupAcr ${{ secrets.RESOURCE_GROUP_ACR }} -kvClientId ${{ secrets.KV_CLIENT_ID }}
61+
- name: Install Helm Chart
62+
run: |
63+
helm repo update
64+
helm upgrade --install -f Deploy/powershell/_values-gh.yaml --set kv.clientsecret=${{ secrets.KV_CLIENT_SECRET }} --set kv.enabled=true --set image.repository=${{ secrets.ACR_NAME }}.azurecr.io/game.api --set image.tag=gh-${{ github.sha }} --set replicaCount=2 game-api ${{ secrets.ACR_NAME }}/game-api --version=1.0.0-${{ github.sha }}
65+
66+
+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Java Player Workflow
2+
3+
name: JavaPlayer
4+
5+
on:
6+
push:
7+
paths:
8+
- Source/Services/RPSLS.JavaPlayer.Api/**
9+
- .github/workflows/java_player_cicd.yml
10+
- Deploy/helm/java-player/**
11+
branches:
12+
- master
13+
14+
jobs:
15+
buildpush:
16+
runs-on: ubuntu-16.04
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Build the Docker image
20+
working-directory: Source/Services/RPSLS.JavaPlayer.Api
21+
run: docker build . --file Dockerfile --tag ${{ secrets.ACR_NAME }}.azurecr.io/java.player:gh-${{ github.sha }}
22+
- name: Login to Azure
23+
uses: azure/login@v1
24+
with:
25+
creds: ${{ secrets.AZURE_CREDENTIALS }}
26+
- name: Set Azure subscription
27+
run: |
28+
az account set -s ${{ secrets.AZURE_SUBSCRIPTION }}
29+
- name: Docker push
30+
run: |
31+
az acr login -n ${{ secrets.ACR_NAME }}
32+
docker push ${{ secrets.ACR_NAME }}.azurecr.io/java.player:gh-${{ github.sha }}
33+
- name: Set AKS kubectl context
34+
uses: azure/aks-set-context@v1
35+
with:
36+
creds: '${{ secrets.AZURE_CREDENTIALS }}'
37+
cluster-name: ${{ secrets.CLUSTER_NAME }}
38+
resource-group: ${{ secrets.RESOURCE_GROUP }}
39+
- name: Set up Helm
40+
uses: azure/setup-helm@v1
41+
with:
42+
version: latest
43+
id: install
44+
- name: Helm repo add
45+
run: |
46+
#curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
47+
#chmod 700 get_helm.sh
48+
#./get_helm.sh
49+
az acr helm repo add -n ${{ secrets.ACR_NAME }}
50+
- name: Package Helm chart
51+
run: |
52+
helm package Deploy/helm/java-player -d Deploy/helm/__charts --version 1.0.0-${{ github.sha }}
53+
- name: Upload chart to ACR
54+
run: |
55+
az acr helm push Deploy/helm/__charts/java-player-1.0.0-${{ github.sha }}.tgz -n ${{ secrets.ACR_NAME }}
56+
- name: Generate config file
57+
shell: pwsh
58+
run: |
59+
az extension add --name application-insights
60+
Deploy/powershell/Generate-Config.ps1 -gvaluesTemplate gvalues.template.gh -resourceGroup ${{ secrets.RESOURCE_GROUP }} -outputFile _values-gh.yaml -aksHost ${{ secrets.AKS_HOST }} -resourceGroupAcr ${{ secrets.RESOURCE_GROUP_ACR }}
61+
- name: Install Helm Chart
62+
run: |
63+
helm repo update
64+
helm upgrade --install -f Deploy/powershell/_values-gh.yaml --set image.repository=${{ secrets.ACR_NAME }}.azurecr.io/java.player --set image.tag=gh-${{ github.sha }} --set replicaCount=2 java-player ${{ secrets.ACR_NAME }}/java-player --version=1.0.0-${{ github.sha }}
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Node Player Workflow
2+
3+
name: NodePlayer
4+
5+
on:
6+
push:
7+
paths:
8+
- Source/Services/RPSLS.NodePlayer.Api/**
9+
- .github/workflows/node_player_cicd.yml
10+
- Deploy/helm/node-player/**
11+
branches:
12+
- master
13+
14+
jobs:
15+
buildpush:
16+
runs-on: ubuntu-16.04
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Build the Docker image
20+
working-directory: Source/Services/RPSLS.NodePlayer.Api
21+
run: docker build . --file Dockerfile --tag ${{ secrets.ACR_NAME }}.azurecr.io/node.player:gh-${{ github.sha }}
22+
- name: Login to Azure
23+
uses: azure/login@v1
24+
with:
25+
creds: ${{ secrets.AZURE_CREDENTIALS }}
26+
- name: Set Azure subscription
27+
run: |
28+
az account set -s ${{ secrets.AZURE_SUBSCRIPTION }}
29+
- name: Docker push
30+
run: |
31+
az acr login -n ${{ secrets.ACR_NAME }}
32+
docker push ${{ secrets.ACR_NAME }}.azurecr.io/node.player:gh-${{ github.sha }}
33+
- name: Set AKS kubectl context
34+
uses: azure/aks-set-context@v1
35+
with:
36+
creds: '${{ secrets.AZURE_CREDENTIALS }}'
37+
cluster-name: ${{ secrets.CLUSTER_NAME }}
38+
resource-group: ${{ secrets.RESOURCE_GROUP }}
39+
- name: Set up Helm
40+
uses: azure/setup-helm@v1
41+
with:
42+
version: latest
43+
id: install
44+
- name: Helm repo add
45+
run: |
46+
#curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
47+
#chmod 700 get_helm.sh
48+
#./get_helm.sh
49+
az acr helm repo add -n ${{ secrets.ACR_NAME }}
50+
- name: Package Helm chart
51+
run: |
52+
helm package Deploy/helm/node-player -d Deploy/helm/__charts --version 1.0.0-${{ github.sha }}
53+
- name: Upload chart to ACR
54+
run: |
55+
az acr helm push Deploy/helm/__charts/node-player-1.0.0-${{ github.sha }}.tgz -n ${{ secrets.ACR_NAME }}
56+
- name: Generate config file
57+
shell: pwsh
58+
run: |
59+
az extension add --name application-insights
60+
Deploy/powershell/Generate-Config.ps1 -gvaluesTemplate gvalues.template.gh -resourceGroup ${{ secrets.RESOURCE_GROUP }} -outputFile _values-gh.yaml -aksHost ${{ secrets.AKS_HOST }} -resourceGroupAcr ${{ secrets.RESOURCE_GROUP_ACR }}
61+
- name: Install Helm Chart
62+
run: |
63+
helm repo update
64+
helm upgrade --install -f Deploy/powershell/_values-gh.yaml --set image.repository=${{ secrets.ACR_NAME }}.azurecr.io/node.player --set image.tag=gh-${{ github.sha }} --set replicaCount=2 node-player ${{ secrets.ACR_NAME }}/node-player --version=1.0.0-${{ github.sha }}
65+
66+

.github/workflows/php_player_cicd.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Php Player Workflow
2+
3+
name: PhpPlayer
4+
5+
on:
6+
push:
7+
paths:
8+
- Source/Services/RPSLS.PHPPlayer.Api/**
9+
- .github/workflows/php_player_cicd.yml
10+
- Deploy/helm/php-player/**
11+
branches:
12+
- master
13+
14+
jobs:
15+
buildpush:
16+
runs-on: ubuntu-16.04
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Build the Docker image
20+
working-directory: Source/Services/RPSLS.PHPPlayer.Api
21+
run: docker build . --file Dockerfile --tag ${{ secrets.ACR_NAME }}.azurecr.io/php.player:gh-${{ github.sha }}
22+
- name: Login to Azure
23+
uses: azure/login@v1
24+
with:
25+
creds: ${{ secrets.AZURE_CREDENTIALS }}
26+
- name: Set Azure subscription
27+
run: |
28+
az account set -s ${{ secrets.AZURE_SUBSCRIPTION }}
29+
- name: Docker push
30+
run: |
31+
az acr login -n ${{ secrets.ACR_NAME }}
32+
docker push ${{ secrets.ACR_NAME }}.azurecr.io/php.player:gh-${{ github.sha }}
33+
- name: Set AKS kubectl context
34+
uses: azure/aks-set-context@v1
35+
with:
36+
creds: '${{ secrets.AZURE_CREDENTIALS }}'
37+
cluster-name: ${{ secrets.CLUSTER_NAME }}
38+
resource-group: ${{ secrets.RESOURCE_GROUP }}
39+
- name: Set up Helm
40+
uses: azure/setup-helm@v1
41+
with:
42+
version: latest
43+
id: install
44+
- name: Helm repo add
45+
run: |
46+
#curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
47+
#chmod 700 get_helm.sh
48+
#./get_helm.sh
49+
az acr helm repo add -n ${{ secrets.ACR_NAME }}
50+
- name: Package Helm chart
51+
run: |
52+
helm package Deploy/helm/php-player -d Deploy/helm/__charts --version 1.0.0-${{ github.sha }}
53+
- name: Upload chart to ACR
54+
run: |
55+
az acr helm push Deploy/helm/__charts/php-player-1.0.0-${{ github.sha }}.tgz -n ${{ secrets.ACR_NAME }}
56+
- name: Generate config file
57+
shell: pwsh
58+
run: |
59+
az extension add --name application-insights
60+
Deploy/powershell/Generate-Config.ps1 -gvaluesTemplate gvalues.template.gh -resourceGroup ${{ secrets.RESOURCE_GROUP }} -outputFile _values-gh.yaml -aksHost ${{ secrets.AKS_HOST }} -resourceGroupAcr ${{ secrets.RESOURCE_GROUP_ACR }}
61+
- name: Install Helm Chart
62+
run: |
63+
helm repo update
64+
helm upgrade --install -f Deploy/powershell/_values-gh.yaml --set image.repository=${{ secrets.ACR_NAME }}.azurecr.io/php.player --set image.tag=gh-${{ github.sha }} --set replicaCount=2 php-player ${{ secrets.ACR_NAME }}/php-player --version=1.0.0-${{ github.sha }}
65+
66+
67+
68+
69+
70+
71+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Node Player Workflow
2+
3+
name: predictorFunction
4+
5+
on:
6+
push:
7+
paths:
8+
- Source/Functions/
9+
- .github/workflows/predictor_function_cicd.yml
10+
# - Deploy/helm/node-player/**
11+
branches:
12+
- master
13+
14+
jobs:
15+
buildpush:
16+
runs-on: ubuntu-16.04
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Login to Azure
20+
uses: azure/login@v1
21+
with:
22+
creds: ${{ secrets.AZURE_CREDENTIALS }}
23+
- name: Set Azure subscription
24+
run: |
25+
az account set -s ${{ secrets.AZURE_SUBSCRIPTION }}
26+
- uses: Azure/functions-action@v1
27+
id: fa
28+
with:
29+
app-name: rpslsfuncappe6zgucludkrny
30+
package: 'Source/Functions/RPSLS.Python.Api'

0 commit comments

Comments
 (0)