|
@@ -45,15 +45,15 @@ cat <<EOREADME
|
|
|
|
|
|
## Maintained by: $maintainer
|
|
|
|
|
|
-This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [$repo]($hubPage) (not to be confused with any official $repo image provided by $repo upstream). See [the Docker Hub page]($hubPage) for the full readme on how to use this Docker image and for information regarding contributing and issues.
|
|
|
+This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [\`$repo\`]($hubPage) (not to be confused with any official \`$repo\` image provided by \`$repo\` upstream). See [the Docker Hub page]($hubPage) for the full readme on how to use this Docker image and for information regarding contributing and issues.
|
|
|
|
|
|
-The [full description from Docker Hub]($hubPage) is generated over in [docker-library/docs]($gitRepo), specifically in [docker-library/docs/$repo]($gitRepo/tree/master/$repo).
|
|
|
+The [full image description on Docker Hub]($hubPage) is generated/maintained over in [the docker-library/docs repository]($gitRepo), specifically in [the \`$repo\` directory]($gitRepo/tree/master/$repo).
|
|
|
|
|
|
## See a change merged here that doesn't show up on 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 full official images change lifecycle, see [the "An image's source changed in Git, now what?" FAQ entry](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what).
|
|
|
|
|
|
-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).
|
|
|
+For outstanding \`$repo\` image PRs, check [PRs with the "library/$repo" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2F$repo). For the current "source of truth" for [\`$repo\`]($hubPage), see [the \`library/$repo\` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/$repo).
|
|
|
EOREADME
|
|
|
|
|
|
badges=()
|
|
@@ -61,24 +61,25 @@ badges=()
|
|
|
n=$'\n'
|
|
|
t=$'\t'
|
|
|
|
|
|
-travisImage="https://img.shields.io/travis/$travisRepo/master.svg"
|
|
|
-if svg="$(wget -qO- "$travisImage" 2>/dev/null)" && [[ "$svg" != *unknown* ]]; then
|
|
|
- travisLink="https://travis-ci.org/$travisRepo/branches"
|
|
|
- badges+=( "-${t}[Travis CI: ${n}${t}]($travisLink)" )
|
|
|
-fi
|
|
|
-
|
|
|
-# https://www.appveyor.com/docs/status-badges/#badges-for-projects-with-public-repositories-on-github-and-bitbucket
|
|
|
-appveyorImage="https://ci.appveyor.com/api/projects/status/github/docker-library/$repo?branch=master&svg=true"
|
|
|
-if svg="$(wget -qO- "$appveyorImage" 2>/dev/null)" && [[ "$svg" != *unknown* ]]; then
|
|
|
- appveyorLink="https://ci.appveyor.com/project/docker-library/$repo"
|
|
|
- badges+=( "-${t}[AppVeyor (Windows): ${n}${t}]($appveyorLink)" )
|
|
|
-fi
|
|
|
-
|
|
|
-jenkinsImage="https://doi-janky.infosiftr.net/job/update.sh/job/$repo/badge/icon"
|
|
|
-if wget -q --spider "$jenkinsImage" &> /dev/null; then
|
|
|
- jenkinsLink="https://doi-janky.infosiftr.net/job/update.sh/job/$repo"
|
|
|
- badges+=( "-${t}[Automated \`update.sh\`: ${n}${t}]($jenkinsLink)" )
|
|
|
-fi
|
|
|
+toTest=(
|
|
|
+ "https://img.shields.io/travis/$travisRepo/master.svg?label=Travis%20CI" "https://travis-ci.org/$travisRepo/branches"
|
|
|
+ "https://img.shields.io/appveyor/ci/$travisRepo/master.svg?label=AppVeyor" "https://ci.appveyor.com/project/$travisRepo"
|
|
|
+ "https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/$repo.svg?label=Automated%20update.sh" "https://doi-janky.infosiftr.net/job/update.sh/job/$repo"
|
|
|
+)
|
|
|
+
|
|
|
+_check_shields_io_image() {
|
|
|
+ wget -qO- "$1" 2>/dev/null \
|
|
|
+ | grep -qvE 'unknown|invalid|access denied|not found'
|
|
|
+}
|
|
|
+
|
|
|
+set -- "${toTest[@]}"
|
|
|
+while [ "$#" -gt 0 ]; do
|
|
|
+ image="$1"; shift
|
|
|
+ url="$1"; shift
|
|
|
+ if _check_shields_io_image "$image"; then
|
|
|
+ badges+=( "-${t}[]($url)" )
|
|
|
+ fi
|
|
|
+done
|
|
|
|
|
|
arches="$(bashbrew cat --format '{{ range .Entries }}{{ join "\n" .Architectures }}{{ "\n" }}{{ end }}' "https://github.com/docker-library/official-images/raw/master/library/$repo" | sort -u)"
|
|
|
if [ -n "$arches" ]; then
|
|
@@ -86,9 +87,9 @@ if [ -n "$arches" ]; then
|
|
|
i=0
|
|
|
for arch in $arches; do
|
|
|
jenkinsLink="https://doi-janky.infosiftr.net/job/multiarch/job/$arch/job/$repo"
|
|
|
- jenkinsImage="$jenkinsLink/badge/icon"
|
|
|
- if wget -q --spider "$jenkinsImage" &> /dev/null; then
|
|
|
- archTable="${archTable:-|} [\`$arch\`<br />]($jenkinsLink) |"
|
|
|
+ jenkinsImage="https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/$arch/job/$repo.svg?label=$arch"
|
|
|
+ if _check_shields_io_image "$jenkinsImage"; then
|
|
|
+ archTable="${archTable:-|} []($jenkinsLink) |"
|
|
|
(( i = (i + 1) % 4 )) || : # modulo here needs to match the number of colums used below
|
|
|
if [ "$i" = 0 ]; then
|
|
|
archTable+="${n}|"
|
|
@@ -96,7 +97,10 @@ if [ -n "$arches" ]; then
|
|
|
fi
|
|
|
done
|
|
|
if [ -n "$archTable" ]; then
|
|
|
- badges+=( "${n}| Build | Status | Badges | (per-arch) |${n}|:-:|:-:|:-:|:-:|${n}${archTable%${n}|}" )
|
|
|
+ if [ "${#badges[@]}" -gt 0 ]; then
|
|
|
+ badges+=( '' )
|
|
|
+ fi
|
|
|
+ badges+=( "| Build | Status | Badges | (per-arch) |${n}|:-:|:-:|:-:|:-:|${n}${archTable%${n}|}" )
|
|
|
fi
|
|
|
fi
|
|
|
|