Skip to content

Commit

Permalink
Finally remove onbuild completely
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Jul 20, 2018
1 parent eca972d commit b9e495c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 71 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ script:
set -x
travis_retry docker build -t "$image" .
~/official-images/test/run.sh "$image"
if [ -d onbuild ]; then
onbuildFrom="$(awk 'toupper($1) == "FROM" { print $2; exit }' onbuild/Dockerfile)"
docker tag "$image" "$onbuildFrom"
docker build -t "$image-onbuild" onbuild
~/official-images/test/run.sh "$image-onbuild"
fi
)
after_script:
Expand Down
13 changes: 0 additions & 13 deletions 2.3/jessie/onbuild/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions 2.4/jessie/onbuild/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile-onbuild.template

This file was deleted.

22 changes: 4 additions & 18 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ join() {

for version in "${versions[@]}"; do
for v in \
{stretch,jessie}{,/slim,/onbuild} \
{stretch,jessie}{,/slim} \
alpine{3.7,3.6} \
; do
dir="$version/$v"
Expand All @@ -89,13 +89,7 @@ for version in "${versions[@]}"; do

commit="$(dirCommit "$dir")"

versionDockerfile="$dir/Dockerfile"
versionCommit="$commit"
if [ "$variant" = 'onbuild' ]; then
versionDockerfile="$(dirname "$dir")/Dockerfile"
versionCommit="$(dirCommit "$(dirname "$versionDockerfile")")"
fi
fullVersion="$(git show "$versionCommit":"$versionDockerfile" | awk '$1 == "ENV" && $2 == "RUBY_VERSION" { print $3; exit }')"
fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "RUBY_VERSION" { print $3; exit }')"

versionAliases=(
$fullVersion
Expand All @@ -117,16 +111,8 @@ for version in "${versions[@]}"; do
esac
variantAliases=( "${variantAliases[@]//latest-/}" )

case "$v" in
*/onbuild)
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$(dirname "$dir")/Dockerfile")"
variantArches="${parentRepoToArches[$variantParent]}"
;;
*)
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
variantArches="${parentRepoToArches[$variantParent]}"
;;
esac
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
variantArches="${parentRepoToArches[$variantParent]}"

echo
cat <<-EOE
Expand Down
11 changes: 3 additions & 8 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ for version in "${versions[@]}"; do

for v in \
alpine{3.6,3.7} \
{jessie,stretch}{/slim,/onbuild,} \
{jessie,stretch}{/slim,} \
; do
dir="$version/$v"
variant="$(basename "$v")"

[ -d "$dir" ] || continue

case "$variant" in
slim|onbuild|windowsservercore) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;;
slim|windowsservercore) template="$variant"; tag="$(basename "$(dirname "$dir")")" ;;
alpine*) template='alpine'; tag="${variant#alpine}" ;;
*) template='debian'; tag="$variant" ;;
esac
Expand All @@ -97,12 +97,7 @@ for version in "${versions[@]}"; do
-e 's/^(FROM (debian|buildpack-deps|alpine)):.*/\1:'"$tag"'/' \
"$template" > "$dir/Dockerfile"

case "$v" in
*/onbuild) ;;
*)
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
;;
esac
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
done
done

Expand Down

0 comments on commit b9e495c

Please sign in to comment.