Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build_deploy_aks
on:
push:
paths:
- "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: ACR build
id: build-push-acr
uses: azure/acr-build@v1
with:
service_principal: ${{ secrets.service_principal }}
service_principal_password: ${{ secrets.service_principal_password }}
tenant: ${{ secrets.tenant }}
registry: ${{ secrets.registry }}
repository: ${{ secrets.repository }}
image: azure-vote-front
folder: azure-vote
branch: master
tag: ${{ github.sha }}
- name: Azure login
id: login
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set AKS context
id: set-context
uses: azure/aks-set-context@v3
with:
resource-group: '${{ secrets.resource_group }}'
cluster-name: '${{ secrets.cluster_name }}'
- name: Setup kubectl
id: install-kubectl
uses: azure/setup-kubectl@v3
- name: Deploy to AKS
id: deploy-aks
uses: Azure/k8s-deploy@v4
with:
namespace: 'default'
manifests: |
azure-vote-all-in-one-redis.yaml
images: '${{ secrets.registry }}.azurecr.io/${{ secrets.repository }}/azure-vote-front:${{ github.sha }}'
pull-images: false
- name: Get Pods yes
run: kubectl get pods | grep vote
2 changes: 1 addition & 1 deletion azure-vote-all-in-one-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
"kubernetes.io/os": linux
containers:
- name: azure-vote-back
image: mcr.microsoft.com/oss/bitnami/redis:6.0.8
image: acrgh455.azurecr.io/azuredocs/azure-vote-front:v1
env:
- name: ALLOW_EMPTY_PASSWORD
value: "yes"
Expand Down
4 changes: 2 additions & 2 deletions azure-vote/azure-vote/config_file.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# UI Configurations
TITLE = 'Azure Voting App'
VOTE1VALUE = 'Cats'
VOTE1VALUE = 'Fishs'
VOTE2VALUE = 'Dogs'
SHOWHOST = 'false'
SHOWHOST = 'false'