0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2024-12-25 18:46:14 +01:00

Fix list of architectures for Apline

This commit is contained in:
J0WI 2018-02-14 01:19:07 +01:00
parent bf2dc98496
commit 8281ad1663
2 changed files with 23 additions and 3 deletions

View file

@ -42,8 +42,9 @@ jobs:
- <<: *test-scripts
env: SCRIPT=generate-stackbrew-library.sh
script:
- ./generate-stackbrew-library.sh
script:
# Only syntax check due bashbrew dependency
- bash -n generate-stackbrew-library.sh
- stage: test images
env: VERSION=11.0 VARIANT=fpm-alpine ARCH=amd64

View file

@ -25,6 +25,22 @@ dockerfileCommit() {
)
}
getArches() {
local repo="$1"; shift
local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/'
eval "declare -g -A parentRepoToArches=( $(
find -name 'Dockerfile' -exec awk '
toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|microsoft\/[^:]+)(:|$)/ {
print "'"$officialImagesUrl"'" $2
}
' '{}' + \
| sort -u \
| xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
) )"
}
getArches 'nextcloud'
# Header.
cat <<-EOH
# This file is generated via https://github.com/nextcloud/docker/blob/$(fileCommit "$self")/$self
@ -70,10 +86,13 @@ for version in "${versions[@]}"; do
variantAliases+=( "${versionAliases[@]}" )
fi
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/$variant/Dockerfile")"
variantArches="${parentRepoToArches[$variantParent]}"
cat <<-EOE
Tags: $(join ', ' "${variantAliases[@]}")
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
Architectures: $(join ', ' $variantArches)
GitCommit: $commit
Directory: $version/$variant
EOE