-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.44 KB
/
main.yml
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: Deploy to AKS Cluster
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Decrypt large secret
run: ./scripts/decrypt.sh
env:
APPLICATION_PROPERTIES_PASSPHRASE: ${{ secrets.APPLICATION_PROPERTIES_PASSPHRASE }}
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn install --file pom.xml
- uses: Azure/docker-login@v1
with:
login-server: tbsacr.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- run: |
docker build -f ./docker/Dockerfile . -t tbsacr.azurecr.io/feedback-viewer:${{ github.sha }}
docker push tbsacr.azurecr.io/feedback-viewer:${{ github.sha }}
# Set the target AKS cluster.
- uses: Azure/aks-set-context@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
cluster-name: tbs-prod-aks
resource-group: tbs-prod-rg
- uses: Azure/k8s-deploy@v1
with:
manifests: |
kubernetes/feedback-viewer-deployment.yml
kubernetes/feedback-viewer-service.yml
kubernetes/feedback-viewer-ingress.yml
images: |
tbsacr.azurecr.io/feedback-viewer:${{ github.sha }}
namespace: |
pagesuccess