5 Deploy Web App #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 5 Deploy Web App | |
on: [workflow_dispatch] | |
env: | |
CLUSTER_NAME: AKSClsuter-Demo | |
AZURE_RG: oa-poc-rg | |
NAMESPACE: appconfig | |
IMAGE: ${{ secrets.CONTAINER_REGISTRY }}/oawebappconfig | |
TAG: 5141 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
# Set the target AKS cluster. | |
- uses: Azure/aks-set-context@v1 | |
with: | |
creds: '${{ secrets.AZURE_CREDENTIALS }}' | |
cluster-name: ${{ env.CLUSTER_NAME }} | |
resource-group: ${{ env.AZURE_RG }} | |
- name: Set up Kustomize | |
run: |- | |
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 | |
chmod u+x ./kustomize | |
- name: Deploy | |
run: |- | |
# replacing the image name in the k8s template | |
ls -l | |
cd yaml_files | |
cp deploy-oawebapp.yaml kustomization.yaml | |
./kustomize edit set image ${{ env.CLUSTER_NAME }}:${{ env.TAG }} | |
./kustomize build . | kubectl apply -f - |