-
Notifications
You must be signed in to change notification settings - Fork 21
67 lines (63 loc) · 2.49 KB
/
stackhpc-promote.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: Promote Pulp repositories
on:
push:
branches:
# NOTE(upgrade): Reference only the current release branch here.
- stackhpc/2024.1
jobs:
promote:
name: Trigger Pulp promotion workflows
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
runs-on: ubuntu-latest
permissions: {}
steps:
# NOTE(mgoddard): Trigger another CI workflow in the
# stackhpc-release-train repository.
- name: Trigger package repository promotion
run: |
gh workflow run \
package-promote.yml \
--repo stackhpc/stackhpc-release-train \
--ref main \
-f kayobe_config_branch=${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
- name: Display link to package repository promotion workflows
run: |
echo "::notice Package repository promote workflow: https://github.com/stackhpc/stackhpc-release-train/actions/workflows/package-promote.yml"
# NOTE(mgoddard): Trigger another CI workflow in the
# stackhpc-release-train repository.
- name: Trigger container image promotion
run: |
gh workflow run \
container-promote.yml \
--repo stackhpc/stackhpc-release-train \
--ref main \
-f kayobe_config_branch=${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.STACKHPC_RELEASE_TRAIN_TOKEN }}
- name: Display link to container image promotion workflows
run: |
echo "::notice Container image promote workflow: https://github.com/stackhpc/stackhpc-release-train/actions/workflows/container-promote.yml"
- name: Send message to Slack via Workflow Builder
uses: slackapi/[email protected]
with:
payload: |
{
"channel-id": "${{ env.SLACK_CHANNEL_ID }}",
"inputs": "${{ env.INPUTS }}",
"message": "${{ env.MESSAGE }}",
"results-url": "${{ env.RESULTS_URL }}",
"workflow-url": "${{ env.WORKFLOW_URL }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# #release-train-alerts
SLACK_CHANNEL_ID: C03B28HRP53
INPUTS: >-
branch: ${{ github.ref_name }}
MESSAGE: "SKC promote workflow failed :sob:"
RESULTS_URL: "N/A"
WORKFLOW_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
if: failure()