Skip to content

Commit 86f712a

Browse files
ci: Add attempt number to the workflow run name, and URL in the slack message (#941)
Co-authored-by: Techassi <[email protected]>
1 parent e5c6b5c commit 86f712a

27 files changed

+110
-54
lines changed

.github/workflows/build_airflow.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Airflow
3+
run-name: |
4+
Build Airflow (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: airflow
@@ -124,7 +126,7 @@ jobs:
124126
channel-id: "C07UG6JH44F" # notifications-container-images
125127
payload: |
126128
{
127-
"text": "*${{ github.workflow }}* failed",
129+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
128130
"attachments": [
129131
{
130132
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -150,7 +152,7 @@ jobs:
150152
{
151153
"type": "button",
152154
"text": "Go to workflow run",
153-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
155+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
154156
}
155157
]
156158
}

.github/workflows/build_druid.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Druid
3+
run-name: |
4+
Build Druid (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: druid
@@ -126,7 +128,7 @@ jobs:
126128
channel-id: "C07UG6JH44F" # notifications-container-images
127129
payload: |
128130
{
129-
"text": "*${{ github.workflow }}* failed",
131+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
130132
"attachments": [
131133
{
132134
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -152,7 +154,7 @@ jobs:
152154
{
153155
"type": "button",
154156
"text": "Go to workflow run",
155-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
156158
}
157159
]
158160
}

.github/workflows/build_hadoop.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Hadoop
3+
run-name: |
4+
Build Hadoop (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: hadoop
@@ -126,7 +128,7 @@ jobs:
126128
channel-id: "C07UG6JH44F" # notifications-container-images
127129
payload: |
128130
{
129-
"text": "*${{ github.workflow }}* failed",
131+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
130132
"attachments": [
131133
{
132134
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -152,7 +154,7 @@ jobs:
152154
{
153155
"type": "button",
154156
"text": "Go to workflow run",
155-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
156158
}
157159
]
158160
}

.github/workflows/build_hbase.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build HBase
3+
run-name: |
4+
Build HBase (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: hbase
@@ -127,7 +129,7 @@ jobs:
127129
channel-id: "C07UG6JH44F" # notifications-container-images
128130
payload: |
129131
{
130-
"text": "*${{ github.workflow }}* failed",
132+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
131133
"attachments": [
132134
{
133135
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -153,7 +155,7 @@ jobs:
153155
{
154156
"type": "button",
155157
"text": "Go to workflow run",
156-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
158+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
157159
}
158160
]
159161
}

.github/workflows/build_hello-world.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Hello-World
3+
run-name: |
4+
Build Hello-World (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: hello-world
@@ -122,7 +124,7 @@ jobs:
122124
channel-id: "C07UG6JH44F" # notifications-container-images
123125
payload: |
124126
{
125-
"text": "*${{ github.workflow }}* failed",
127+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
126128
"attachments": [
127129
{
128130
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -148,7 +150,7 @@ jobs:
148150
{
149151
"type": "button",
150152
"text": "Go to workflow run",
151-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
152154
}
153155
]
154156
}

.github/workflows/build_hive.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Hive
3+
run-name: |
4+
Build Hive (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: hive
@@ -127,7 +129,7 @@ jobs:
127129
channel-id: "C07UG6JH44F" # notifications-container-images
128130
payload: |
129131
{
130-
"text": "*${{ github.workflow }}* failed",
132+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
131133
"attachments": [
132134
{
133135
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -153,7 +155,7 @@ jobs:
153155
{
154156
"type": "button",
155157
"text": "Go to workflow run",
156-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
158+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
157159
}
158160
]
159161
}

.github/workflows/build_java-base.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Java Base
3+
run-name: |
4+
Build Java Base (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: java-base
@@ -122,7 +124,7 @@ jobs:
122124
channel-id: "C07UG6JH44F" # notifications-container-images
123125
payload: |
124126
{
125-
"text": "*${{ github.workflow }}* failed",
127+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
126128
"attachments": [
127129
{
128130
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -148,7 +150,7 @@ jobs:
148150
{
149151
"type": "button",
150152
"text": "Go to workflow run",
151-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
152154
}
153155
]
154156
}

.github/workflows/build_java-devel.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Java Development
3+
run-name: |
4+
Build Java Development (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: java-devel
@@ -122,7 +124,7 @@ jobs:
122124
channel-id: "C07UG6JH44F" # notifications-container-images
123125
payload: |
124126
{
125-
"text": "*${{ github.workflow }}* failed",
127+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
126128
"attachments": [
127129
{
128130
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -148,7 +150,7 @@ jobs:
148150
{
149151
"type": "button",
150152
"text": "Go to workflow run",
151-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
152154
}
153155
]
154156
}

.github/workflows/build_kafka-testing-tools.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Kafka Testing Tools
3+
run-name: |
4+
Build Kafka Testing Tools (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: kafka-testing-tools
@@ -126,7 +128,7 @@ jobs:
126128
channel-id: "C07UG6JH44F" # notifications-container-images
127129
payload: |
128130
{
129-
"text": "*${{ github.workflow }}* failed",
131+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
130132
"attachments": [
131133
{
132134
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -152,7 +154,7 @@ jobs:
152154
{
153155
"type": "button",
154156
"text": "Go to workflow run",
155-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
156158
}
157159
]
158160
}

.github/workflows/build_kafka.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Kafka
3+
run-name: |
4+
Build Kafka (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: kafka
@@ -128,7 +130,7 @@ jobs:
128130
channel-id: "C07UG6JH44F" # notifications-container-images
129131
payload: |
130132
{
131-
"text": "*${{ github.workflow }}* failed",
133+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
132134
"attachments": [
133135
{
134136
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -154,7 +156,7 @@ jobs:
154156
{
155157
"type": "button",
156158
"text": "Go to workflow run",
157-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
159+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
158160
}
159161
]
160162
}

.github/workflows/build_kcat.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build kcat
3+
run-name: |
4+
Build kcat (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: kcat
@@ -126,7 +128,7 @@ jobs:
126128
channel-id: "C07UG6JH44F" # notifications-container-images
127129
payload: |
128130
{
129-
"text": "*${{ github.workflow }}* failed",
131+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
130132
"attachments": [
131133
{
132134
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -152,7 +154,7 @@ jobs:
152154
{
153155
"type": "button",
154156
"text": "Go to workflow run",
155-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
156158
}
157159
]
158160
}

.github/workflows/build_krb5.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Krb5
3+
run-name: |
4+
Build Krb5 (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: krb5
@@ -122,7 +124,7 @@ jobs:
122124
channel-id: "C07UG6JH44F" # notifications-container-images
123125
payload: |
124126
{
125-
"text": "*${{ github.workflow }}* failed",
127+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
126128
"attachments": [
127129
{
128130
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -148,7 +150,7 @@ jobs:
148150
{
149151
"type": "button",
150152
"text": "Go to workflow run",
151-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
153+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
152154
}
153155
]
154156
}

.github/workflows/build_nifi.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build NiFi
3+
run-name: |
4+
Build NiFi (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: nifi
@@ -126,7 +128,7 @@ jobs:
126128
channel-id: "C07UG6JH44F" # notifications-container-images
127129
payload: |
128130
{
129-
"text": "*${{ github.workflow }}* failed",
131+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
130132
"attachments": [
131133
{
132134
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -152,7 +154,7 @@ jobs:
152154
{
153155
"type": "button",
154156
"text": "Go to workflow run",
155-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
156158
}
157159
]
158160
}

.github/workflows/build_omid.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build Omid
3+
run-name: |
4+
Build Omid (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: omid
@@ -126,7 +128,7 @@ jobs:
126128
channel-id: "C07UG6JH44F" # notifications-container-images
127129
payload: |
128130
{
129-
"text": "*${{ github.workflow }}* failed",
131+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
130132
"attachments": [
131133
{
132134
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -152,7 +154,7 @@ jobs:
152154
{
153155
"type": "button",
154156
"text": "Go to workflow run",
155-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
157+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
156158
}
157159
]
158160
}

.github/workflows/build_opa.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
name: Build OPA
3+
run-name: |
4+
Build OPA (attempt #${{ github.run_attempt }})
35
46
env:
57
PRODUCT_NAME: opa
@@ -124,7 +126,7 @@ jobs:
124126
channel-id: "C07UG6JH44F" # notifications-container-images
125127
payload: |
126128
{
127-
"text": "*${{ github.workflow }}* failed",
129+
"text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
128130
"attachments": [
129131
{
130132
"pretext": "See the details below for a summary of which job(s) failed.",
@@ -150,7 +152,7 @@ jobs:
150152
{
151153
"type": "button",
152154
"text": "Go to workflow run",
153-
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
155+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
154156
}
155157
]
156158
}

0 commit comments

Comments
 (0)