AWX Nightly #42
Workflow file for this run
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: AWX Nightly | |
on: | |
workflow_dispatch: | |
inputs: | |
AWX_SERVER: | |
type: string | |
description: 'AWX Server' | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-latest | |
outputs: | |
AWX_SERVER: ${{ steps.step1.outputs.AWX_SERVER }} | |
steps: | |
- id: step1 | |
run: | | |
CURRENTDATE=$(date +'%Y%m%d') | |
if([ "${{ github.event_name }}" == "workflow_dispatch" ]); then | |
echo "AWX_SERVER=${{ github.event.inputs.AWX_SERVER || 'https://awx.ci-ui-${CURRENTDATE}.gcp.testing.ansible.com' }}" >> "$GITHUB_OUTPUT" | |
else | |
echo "AWX_SERVER=https://awx.ci-ui-${CURRENTDATE}.gcp.testing.ansible.com" >> "$GITHUB_OUTPUT" | |
fi | |
awx-e2e: | |
name: AWX E2E | |
needs: setup | |
uses: ./.github/workflows/awx-e2e.yml | |
with: | |
AWX_SERVER: ${{ needs.setup.outputs.AWX_SERVER }} | |
TAGS: nightly | |
secrets: | |
AWX_PASSWORD: ${{ secrets.AWX_PASSWORD }} | |
AWX_PROJECT_ID: ${{ secrets.AWX_PROJECT_ID }} | |
AWX_RECORD_KEY: ${{ secrets.AWX_RECORD_KEY }} | |
slack-success-notification: | |
name: Slack Success Notification | |
if: success() | |
needs: | |
- setup | |
- awx-e2e | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Notification | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"attachments": | |
[ | |
{ | |
"color": "#00DD00", | |
"blocks": | |
[ | |
{ | |
"type": "section", | |
"text": | |
{ | |
"type": "mrkdwn", | |
"text": "*AWX E2E Nightly Success* - ${{ github.repository }} - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Success> - <${{ needs.setup.outputs.AWX_SERVER }}|Server>" | |
} | |
} | |
] | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
slack-failure-notification: | |
name: Slack Failure Notification | |
if: failure() | |
needs: | |
- setup | |
- awx-e2e | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Notification | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"attachments": | |
[ | |
{ | |
"color": "#FF0000", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "*AWX E2E Nightly Failed* - ${{ github.repository }} - *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Failure>* - <${{ needs.setup.outputs.AWX_SERVER }}|Server> - <!here>" | |
} | |
} | |
] | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |