|
18 | 18 | options:
|
19 | 19 | - SMS Lab
|
20 | 20 | - Leafcloud
|
| 21 | + create_skc_pr: |
| 22 | + description: Propose PR to SKC |
| 23 | + type: boolean |
| 24 | + default: true |
21 | 25 | secrets:
|
22 | 26 | KAYOBE_VAULT_PASSWORD:
|
23 | 27 | required: true
|
|
44 | 48 | runs-on: ${{ needs.runner-selection.outputs.runner_name_image_build }}
|
45 | 49 | needs:
|
46 | 50 | - runner-selection
|
47 |
| - permissions: {} |
| 51 | + permissions: |
| 52 | + actions: write |
48 | 53 | steps:
|
49 | 54 | - name: Validate inputs
|
50 | 55 | run: |
|
|
56 | 61 | - name: Install Package
|
57 | 62 | uses: ConorMacBride/install-package@main
|
58 | 63 | with:
|
59 |
| - apt: git unzip nodejs python3-pip python3-venv openssh-server openssh-client jq |
| 64 | + apt: git unzip nodejs python3-pip python3-venv openssh-server openssh-client jq gh |
60 | 65 |
|
61 | 66 | - name: Start the SSH service
|
62 | 67 | run: |
|
@@ -390,3 +395,43 @@ jobs:
|
390 | 395 | OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
|
391 | 396 | OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
|
392 | 397 | if: always()
|
| 398 | + |
| 399 | + - name: Trigger update overcloud host image tags |
| 400 | + run: | |
| 401 | + gh workflow run \ |
| 402 | + update-overcloud-host-image-tags.yml \ |
| 403 | + --repo stackhpc/stackhpc-kayobe-config \ |
| 404 | + --ref $BRANCH_NAME \ |
| 405 | + $(if [[ "${{ inputs.rocky9 }}" == "true" ]]; then echo "-f rocky9_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi) \ |
| 406 | + $(if [[ "${{ inputs.ubuntu-noble }}" == "true" ]]; then echo "-f ubuntu_noble_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi) |
| 407 | + env: |
| 408 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 409 | + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} |
| 410 | + if: inputs.create_skc_pr |
| 411 | + |
| 412 | + - name: Display link to update overcloud host image tags workflows |
| 413 | + run: | |
| 414 | + echo "::notice Overcloud host image promote workflow: https://github.com/stackhpc/stackhpc-kayobe-config/actions/workflows/update-overcloud-host-image-tags.yml" |
| 415 | + if: inputs.create_skc_pr |
| 416 | + |
| 417 | + - name: Send message to Slack via Workflow Builder |
| 418 | + |
| 419 | + with: |
| 420 | + payload: | |
| 421 | + { |
| 422 | + "channel-id": "${{ env.SLACK_CHANNEL_ID }}", |
| 423 | + "inputs": "${{ env.INPUTS }}", |
| 424 | + "message": "${{ env.MESSAGE }}", |
| 425 | + "results-url": "${{ env.RESULTS_URL }}", |
| 426 | + "workflow-url": "${{ env.WORKFLOW_URL }}" |
| 427 | + } |
| 428 | + env: |
| 429 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 430 | + # #release-train-alerts |
| 431 | + SLACK_CHANNEL_ID: C03B28HRP53 |
| 432 | + INPUTS: >- |
| 433 | + branch: ${{ github.ref_name }} |
| 434 | + MESSAGE: "SKC overcloud host image build failed :sob:" |
| 435 | + RESULTS_URL: "N/A" |
| 436 | + WORKFLOW_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" |
| 437 | + if: failure() && inputs.create_skc_pr |
0 commit comments