GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [ISSUE #8544] Add a retry mechanism to the unit test pipeline (#8545) · lltopk/rocketmq@b512ba1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • bazel.yml
    • maven.yaml
    • rerun-workflow.yml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/bazel.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/bazel.yml
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- master
88
- develop
99
- bazel
10+
1011
jobs:
1112
build:
1213
name: "bazel-compile (${{ matrix.os }})"
@@ -19,4 +20,13 @@ jobs:
1920
- name: Build
2021
run: bazel build --config=remote //...
2122
- name: Run Tests
22-
run: bazel test --config=remote //...
23+
run: bazel test --config=remote //...
24+
- name: Retry if failed
25+
# if it failed , retry 2 times at most
26+
if: failure() && fromJSON(github.run_attempt) < 3
27+
env:
28+
GH_REPO: ${{ github.repository }}
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
echo "Attempting to retry workflow..."
32+
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
Collapse file

‎.github/workflows/maven.yaml‎

Copy file name to clipboardExpand all lines: .github/workflows/maven.yaml
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,13 @@ jobs:
3131
with:
3232
name: jvm-crash-logs
3333
path: /Users/runner/work/rocketmq/rocketmq/auth/hs_err_pid*.log
34-
retention-days: 1
34+
retention-days: 1
35+
- name: Retry if failed
36+
# if it failed , retry 2 times at most
37+
if: failure() && fromJSON(github.run_attempt) < 3
38+
env:
39+
GH_REPO: ${{ github.repository }}
40+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
run: |
42+
echo "Attempting to retry workflow..."
43+
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
Collapse file

‎.github/workflows/rerun-workflow.yml‎

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Rerun workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
run_id:
6+
required: true
7+
8+
jobs:
9+
rerun:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: rerun ${{ inputs.run_id }}
13+
env:
14+
GH_REPO: ${{ github.repository }}
15+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
run: |
17+
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
18+
gh run rerun ${{ inputs.run_id }} --failed

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.