mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-17 18:46:43 +01:00
Fix list of architectures for Apline
This commit is contained in:
parent
bf2dc98496
commit
8281ad1663
2 changed files with 23 additions and 3 deletions
|
@ -42,8 +42,9 @@ jobs:
|
||||||
|
|
||||||
- <<: *test-scripts
|
- <<: *test-scripts
|
||||||
env: SCRIPT=generate-stackbrew-library.sh
|
env: SCRIPT=generate-stackbrew-library.sh
|
||||||
script:
|
script:
|
||||||
- ./generate-stackbrew-library.sh
|
# Only syntax check due bashbrew dependency
|
||||||
|
- bash -n generate-stackbrew-library.sh
|
||||||
|
|
||||||
- stage: test images
|
- stage: test images
|
||||||
env: VERSION=11.0 VARIANT=fpm-alpine ARCH=amd64
|
env: VERSION=11.0 VARIANT=fpm-alpine ARCH=amd64
|
||||||
|
|
|
@ -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.
|
# Header.
|
||||||
cat <<-EOH
|
cat <<-EOH
|
||||||
# This file is generated via https://github.com/nextcloud/docker/blob/$(fileCommit "$self")/$self
|
# 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[@]}" )
|
variantAliases+=( "${versionAliases[@]}" )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/$variant/Dockerfile")"
|
||||||
|
variantArches="${parentRepoToArches[$variantParent]}"
|
||||||
|
|
||||||
cat <<-EOE
|
cat <<-EOE
|
||||||
|
|
||||||
Tags: $(join ', ' "${variantAliases[@]}")
|
Tags: $(join ', ' "${variantAliases[@]}")
|
||||||
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
|
Architectures: $(join ', ' $variantArches)
|
||||||
GitCommit: $commit
|
GitCommit: $commit
|
||||||
Directory: $version/$variant
|
Directory: $version/$variant
|
||||||
EOE
|
EOE
|
||||||
|
|
Loading…
Reference in a new issue