Skip to content

Commit

Permalink
[DEVOPS-338] Fix issue with update DNS step using old AKS cluster name (
Browse files Browse the repository at this point in the history
#97)

<details open>
<summary><a href="https://amuniversal.atlassian.net/browse/DEVOPS-338"
title="DEVOPS-338" target="_blank">DEVOPS-338</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
      <td>Add update-dns step back into AKS deploy workflow</td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Story"
src="https://amuniversal.atlassian.net/images/icons/issuetypes/story.png"
/>
        Story
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>To Do</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
      <td>-</td>
    </tr>
  </table>
</details>
<!--
do not remove this marker as it will break action-jira-linter's
functionality.
  added_by_jira_lint
-->
---

<!-- Please make sure you read the contribution guidelines and then fill
out the blanks below.

Please format the PR title appropriately based on the type of change:
  [JIRA-XXX]: <description>
-->

## Description

- Combined `deploy` and `update-records` jobs to have both the AKS
deploy step and the DNS step use the same `AKS_CLUSTER_NAME` input
- Removed redundant outputs from `GITHUB_STEP_SUMMARY`

## Related Links

<!-- List any links related to this pull request here

Replace "JIRA-XXX" with the your Jira issue key -->

- Jira Issue: DEVOPS-338
- Testing environment: [![Development AKS
Deploy](https://github.com/Andrews-McMeel-Universal/reusable_workflows-test/actions/workflows/aks-development.yml/badge.svg?branch=main)](https://github.com/Andrews-McMeel-Universal/reusable_workflows-test/actions/workflows/aks-development.yml)
- DNS record after workflow run:
![image](https://github.com/Andrews-McMeel-Universal/reusable_workflows/assets/111298136/fd393649-5437-4033-a4bd-4df4bdcd9538)
  • Loading branch information
ebronson68 committed Dec 12, 2023
1 parent 02a19f7 commit cd1edfb
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/aks-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -407,17 +407,6 @@ jobs:
"${{ needs.build.outputs.imagePullSecret }}"
pull-images: false

update-records:
name: Update deployment records
needs: [build, deploy]
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Login via Az module
uses: azure/login@v1
with:
creds: "${{ secrets.azureCredentials }}"

- name: Create or Update Public DNS Record
id: dns
run: |
Expand All @@ -427,7 +416,7 @@ jobs:
INGRESS="${{ secrets.azureClusterName }}"
fi
AKS_INGRESS="${INGRESS}-ingress.centralus.cloudapp.azure.com."
# az network dns record-set cname set-record --resource-group "${{ inputs.dnsResourceGroup }}" --zone-name "${{ needs.build.outputs.domainName }}" --record-set-name "${{ needs.build.outputs.hostName }}" --cname "${AKS_INGRESS}" --ttl 3600
az network dns record-set cname set-record --resource-group "${{ inputs.dnsResourceGroup }}" --zone-name "${{ needs.build.outputs.domainName }}" --record-set-name "${{ needs.build.outputs.hostName }}" --cname "${AKS_INGRESS}" --ttl 3600
echo "aksIngress=${AKS_INGRESS}" >> $GITHUB_OUTPUT
Expand All @@ -450,8 +439,6 @@ jobs:
echo "- **Version**: ${{ needs.build.outputs.appVersion }}" >> $GITHUB_STEP_SUMMARY
echo "- **Key Vault Name**: ${{ inputs.environmentKeyVault }}" >> $GITHUB_STEP_SUMMARY
echo "- **FQDN**: ${{ needs.build.outputs.ingress }}" >> $GITHUB_STEP_SUMMARY
echo "- **DNS**: ${{ steps.dns.outputs.aksIngress }}" >> $GITHUB_STEP_SUMMARY
echo "- **Cluster**: ${{ secrets.azureClusterName }}" >> $GITHUB_STEP_SUMMARY
echo "- **ConfigSecret**: ${{ needs.build.outputs.configSecret }}" >> $GITHUB_STEP_SUMMARY
if [[ -n "${{ needs.build.outputs.configMap }}" ]] ; then
echo "- **ConfigMap**: ${{ needs.build.outputs.configMap }}" >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit cd1edfb

Please sign in to comment.