Skip to content

Commit 715f00a

Browse files
committed
Add Jenkins "update.sh" badges to our docker-library repo README stubs for better community visibility
1 parent 819dc2e commit 715f00a

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

generate-repo-stub-readme.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ fi
1919
gitRepo='https://github.com/docker-library/docs'
2020
hubPage="https://registry.hub.docker.com/_/$repo/"
2121

22-
canonicalRepo="$(curl -fsSLI -o /dev/null -w '%{url_effective}\n' "https://github.com/docker-library/$repo")" # follow redirects (http://stackoverflow.com/a/3077316/433558)
22+
canonicalRepo="https://github.com/docker-library/$repo"
23+
if [ -s "$repo/github-repo" ]; then
24+
canonicalRepo="$(< "$repo/github-repo")"
25+
fi
26+
canonicalRepo="$(curl -fsSLI -o /dev/null -w '%{url_effective}\n' "$canonicalRepo")" # follow redirects (http://stackoverflow.com/a/3077316/433558)
2327
travisRepo="${canonicalRepo#*://github.com/}"
2428

2529
cat <<EOREADME
@@ -30,8 +34,19 @@ This is the Git repo of the Docker [official image](https://docs.docker.com/dock
3034
The full readme is generated over in [docker-library/docs]($gitRepo), specifically in [docker-library/docs/$repo]($gitRepo/tree/master/$repo).
3135
3236
See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/$repo" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/$repo), especially [PRs with the "library/$repo" label on that repo](https://github.com/docker-library/official-images/labels/library%2F$repo). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md).
37+
EOREADME
38+
39+
if wget -q --spider "https://img.shields.io/travis/$travisRepo/master.svg" &> /dev/null; then
40+
echo
41+
echo "[![Travis CI](https://img.shields.io/travis/$travisRepo/master.svg)](https://travis-ci.org/$travisRepo/branches)"
42+
fi
3343

34-
[![Travis CI](https://img.shields.io/travis/$travisRepo/master.svg)](https://travis-ci.org/$travisRepo/branches)
44+
if wget -q --spider "https://doi-janky.infosiftr.net/job/update.sh/job/$repo/badge/icon" &> /dev/null; then
45+
echo
46+
echo "[![Automated \"update.sh\"](https://doi-janky.infosiftr.net/job/update.sh/job/$repo/badge/icon)](https://doi-janky.infosiftr.net/job/update.sh/job/$repo)"
47+
fi
48+
49+
cat <<EOREADME
3550
3651
<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->
3752
EOREADME

0 commit comments

Comments
 (0)