11# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
2- name : Build env
2+ name : Build environment
33
44# name of GitHub event that triggers workflow
55# https://help.github.com/en/actions/reference/events-that-trigger-workflows#watch-event-watch
44444545 ENABLE_TLS_INGRESS : true
4646 FORCE_TEST_FAIL : false
47- HAS_SUBDOMAIN : true
4847 K8S_TLS_SECRET_NAME : tls-secret
4948 KEY_VAULT_NAME : kv-rush-iz6y
5049 KEY_VAULT_CERT_NAME : wildcard-thehypepipe-co-uk
@@ -107,6 +106,12 @@ jobs:
107106 - name : Login to Azure
108107 run : ./scripts/azure_login.sh
109108
109+ # This is required when developing after the initial build, and the AKS cluster may have been stopped
110+ # Ensure AKS cluster is running, else timeouts will occur on k8s Terraform apply tasks
111+ - name : Start AKS Cluster
112+ continue-on-error : true
113+ run : ./scripts/start_aks_cluster.sh
114+
110115
111116 # Prereqs
112117 - name : Create Storage Account for Terraform state
@@ -209,15 +214,23 @@ jobs:
209214 run : ./scripts/push_docker_images.sh
210215
211216
217+ # TODO: Remove once issue has been fixed
218+ # https://github.com/terraform-providers/terraform-provider-azurerm/issues/8546
219+ - name : Restart Function App
220+ run : az functionapp restart --name "${{ env.PREFIX }}-funcapp" --resource-group "${{ env.PREFIX }}-rg-function-app"
221+
222+
212223 # Pester tests
213224 - name : Run Pester tests
225+ continue-on-error : true
214226 run : pwsh -command "./scripts/Start-Test.ps1"
215227
216228 - name : Archive test artifacts
217229 uses : actions/upload-artifact@v1
218230 with :
219231 name : test results
220232 path : test/pester-test-results.xml
233+ # TODO: only run when previous task (Pester tests) has been successful
221234 if : always()
222235
223236 # remove NuGet proxy repo so pester report step doesnt fail
@@ -226,6 +239,8 @@ jobs:
226239
227240 # Shows at the bottom of a run: https://github.com/adamrushuk/aks-nexus-velero/runs/1035347513?check_suite_focus=true
228241 - name : Pester report
242+ # TODO: remove continue-on-error once bug is fixed
243+ continue-on-error : true
229244230245 with :
231246 test_results_path : test/pester-test-results.xml
@@ -237,11 +252,9 @@ jobs:
237252 # Notify
238253 - name : Notify slack
239254 env :
255+ SLACK_CHANNEL_ID : ${{ secrets.SLACK_CHANNEL_ID }}
240256 SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
241- uses :
pullreminders/[email protected] 242- with :
243- # env var concatenation not supported atm, so hard-code messages
244- args : ' {\"channel\":\"C012ZQHT9A4\",\"text\":\"[aks-nexus-velero] Build complete\"}'
257+ run : ./scripts/send_slack_message.sh "[aks-nexus-velero] Build complete"
245258
246259
247260 # used for any windows-only tasks
0 commit comments