Skip to content

Commit 2f73502

Browse files
authored
Add markdown link check (#74)
Resolves #65
1 parent dfcca99 commit 2f73502

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"retryOn429" : true,
3+
"ignorePatterns" : [
4+
{
5+
"pattern" : "^http://localhost:.*"
6+
},
7+
{
8+
"pattern" : "^http://0\\.0\\.0\\.0:.*"
9+
}
10+
]
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash -e
2+
3+
# this script helps to reduce sporadic link check failures by retrying at a file-by-file level
4+
5+
retry_count=3
6+
7+
for file in "$@"; do
8+
for i in $(seq 1 $retry_count); do
9+
if markdown-link-check --config "$(dirname "$0")/../config/markdown-link-check-config.json" \
10+
"$file"; then
11+
break
12+
elif [[ $i -eq $retry_count ]]; then
13+
exit 1
14+
fi
15+
sleep 5
16+
done
17+
done

.github/workflows/build.yml

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343

4444
- run: java -cp sdk-usage/build/libs/opentelemetry-examples-sdk-usage-0.1.0-SNAPSHOT-all.jar io.opentelemetry.sdk.example.ConfigureSpanProcessorExample
4545

46+
# this is not a required check to avoid blocking pull requests if external links break
47+
markdown-link-check:
48+
uses: ./.github/workflows/reusable-markdown-link-check.yml
49+
4650
required-status-check:
4751
needs:
4852
- gradle-wrapper-validation
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Reusable - Markdown link check
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
markdown-link-check:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Install markdown-link-check
13+
run: npm install -g markdown-link-check
14+
15+
- name: Run markdown-link-check
16+
run: |
17+
find . -type f \
18+
-name '*.md' \
19+
| xargs .github/scripts/markdown-link-check-with-retry.sh

jaeger/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ java -cp build/libs/opentelemetry-examples-jaeger-0.1.0-SNAPSHOT-all.jar io.open
3434

3535
Navigate to http://localhost:16686
3636

37-
[jaeger]:[https://www.jaegertracing.io/docs/1.16/getting-started/
37+
[jaeger]: https://www.jaegertracing.io/docs/1.16/getting-started/

micrometer-shim/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Micrometer Shim Example
22

33
This example demonstrates a typical use case
4-
of [micrometer1-shim](https://github.com/open-telemetry/opentelemetry-java/tree/main/micrometer1-shim).
4+
of [micrometer shim](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/micrometer/micrometer-1.5/library).
55

66
It consists of a spring boot application with:
77

0 commit comments

Comments
 (0)