Skip to content
Merged
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
29 changes: 4 additions & 25 deletions .github/workflows/azure-login-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
uses: actions/checkout@v6

- name: 'Az CLI login with subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- run: |
az account show --output none

- name: 'Az CLI login without subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
allow-no-subscriptions: true
Expand All @@ -50,7 +50,7 @@ jobs:
az account show --output none

- name: 'Az CLI login with subscription OIDC'
uses: azure/login@v1
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
Expand All @@ -60,32 +60,11 @@ jobs:
az account show --output none

- name: 'Az CLI login without subscription OIDC'
uses: azure/login@v1
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
allow-no-subscriptions: true

- run: |
az account show --output none

slack-post-result:
runs-on: ubuntu-latest
# continue-on-error: true
if: ${{ always() }}
needs: [az-login-test]
steps:
- name: Create slack post
id: slack_report
run: |
TITLE="Login action canary tests update - "
DATEVAR=`date "+%d/%m/%YT%H:%M:%S"`
TITLE="${TITLE}${DATEVAR}"
REPORT="${TITLE}\r\nLink to run - https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\r\n"
RUN_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
REPORT="${REPORT}\r\n"
if [ ${{needs.az-login-test.result}} == 'success' ]; then REPORT="${REPORT}\r\n|✅|<${RUN_URL}|az-login-test>"; else REPORT="${REPORT}\r\n|❌|<${RUN_URL}|az-login-test>"; fi
echo "report=$REPORT" >> $GITHUB_OUTPUT
- name: Post to slack
shell: bash
run: curl -X POST -H 'Content-type:application/json' --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"${{steps.slack_report.outputs.report}}"}}]}' https://hooks.slack.com/services/${{SECRETS.SLACK_CHANNEL_SECRET}}
39 changes: 8 additions & 31 deletions .github/workflows/azure-login-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# continue-on-error: true
steps:
- name: 'Az CLI login with subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

Expand All @@ -23,7 +23,7 @@ jobs:
az vm list --output none

- name: 'Az CLI login without subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
allow-no-subscriptions: true
Expand All @@ -32,7 +32,7 @@ jobs:
az account show --output none

- name: 'Azure PowerShell login with subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
enable-AzPSSession: true
Expand All @@ -43,7 +43,7 @@ jobs:
azPSVersion: "latest"

- name: 'Azure PowerShell login without subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true
Expand All @@ -59,7 +59,7 @@ jobs:
# continue-on-error: true
steps:
- name: 'Az CLI login with subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
Expand All @@ -70,7 +70,7 @@ jobs:
az vm list --output none

- name: 'Az CLI login without subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
Expand All @@ -80,7 +80,7 @@ jobs:
az account show --output none

- name: 'Azure PowerShell login with subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
Expand All @@ -93,7 +93,7 @@ jobs:
azPSVersion: "latest"

- name: 'Azure PowerShell login without subscription'
uses: azure/login@v1
uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENTID }}
tenant-id: ${{ secrets.AZURE_TENANTID }}
Expand All @@ -104,26 +104,3 @@ jobs:
with:
inlineScript: "(Get-AzContext).Environment.Name"
azPSVersion: "latest"

slack-post-result:
runs-on: ubuntu-latest
# continue-on-error: true
if: ${{ always() }}
needs: [az-login-test-non-oidc, az-login-test-oidc]
steps:
- name: Create slack post
id: slack_report
run: |
TITLE="Login action OIDC flow tests update - "
DATEVAR=`date "+%d/%m/%YT%H:%M:%S"`
TITLE="${TITLE}${DATEVAR}"
REPORT="${TITLE}\r\nLink to run - https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\r\n"
RUN_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
REPORT="${REPORT}\r\n"
if [ ${{needs.az-login-test-non-oidc.result}} == 'success' ]; then REPORT="${REPORT}\r\n|✅|<${RUN_URL}|az-login-test-non-oidc>"; else REPORT="${REPORT}\r\n|❌|<${RUN_URL}|az-login-test-non-oidc>"; fi
if [ ${{needs.az-login-test-oidc.result}} == 'success' ]; then REPORT="${REPORT}\r\n|✅|<${RUN_URL}|az-login-test-oidc>"; else REPORT="${REPORT}\r\n|❌|<${RUN_URL}|az-login-test-oidc>"; fi
echo "report=$REPORT" >> $GITHUB_OUTPUT

- name: Post to slack
shell: bash
run: curl -X POST -H 'Content-type:application/json' --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"${{steps.slack_report.outputs.report}}"}}]}' https://hooks.slack.com/services/${{SECRETS.SLACK_CHANNEL_SECRET}}
Loading
Loading