This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
forked from microsoft/TailwindTraders-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 2.26 KB
/
aks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Web in AKS
# Deploy the Tailwind Traders Web as a deployment in a EXISTING AKS THAT ALREADY HAS THE BACKEND INSTALLED
#
# Note: The AKS MUST HAVE TLS INSTALLED
# Please refer to https://github.com/Microsoft/TailwindTraders-Backend#enabling-ssltls-on-the-cluster-optional-but-highly-recommended and following.
# Installing the WEB on AKS without TLS enabled is NOT supported.
on:
push:
branches:
- main
paths:
- 'TailwindTraders.Website/**'
jobs:
buildpush:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker build and push
working-directory: TailwindTraders.Website/Source/Tailwind.Traders.Web
run: |
docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest
docker push tailwindtraders/web:gh-${{ github.sha }}
- uses: azure/login@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
- name: Set AKS kubectl context
uses: azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: ${{ secrets.AKS_CLUSTER_NAME }}
resource-group: ${{ secrets.AKS_RESOURCEGROUP_NAME }}
- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
export PATH=/usr/local/bin/helm
- name: Install Helm Chart
run: |
helm upgrade --install tailwindtraders-web ./TailwindTraders.Website/Deploy/helm/web -f ./TailwindTraders.Website/Deploy/helm/gvalues.yaml -f ./TailwindTraders.Website/Deploy/helm/values.b2c.yaml --set ingress.hosts={${{ secrets.AKS_HOST_NAME }}} --set ingress.protocol=https --set ingress.tls[0].hosts={${{ secrets.AKS_HOST_NAME }}} --set ingress.tls[0].secretName=${{ secrets.AKS_TLS_SECRET_NAME }} --set image.repository=tailwindtraders/web --set image.tag=gh-${{ github.sha }} --set acsResource=${{ secrets.ACS_RESOURCE }} --set acsConnectionString=${{ secrets.ACS_CONNECTION_STRING }} --email=${{ secrets.ACS_EMAIL }} --set logicAppUrl=${{ secrets.LOGIC_APP_URL }}