From b9e495c8e400363e6cc2d4db6d944235b7989584 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 20 Jul 2018 13:32:43 -0700 Subject: [PATCH] Finally remove onbuild completely --- .travis.yml | 6 ------ 2.3/jessie/onbuild/Dockerfile | 13 ------------- 2.4/jessie/onbuild/Dockerfile | 13 ------------- Dockerfile-onbuild.template | 13 ------------- generate-stackbrew-library.sh | 22 ++++------------------ update.sh | 11 +++-------- 6 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 2.3/jessie/onbuild/Dockerfile delete mode 100644 2.4/jessie/onbuild/Dockerfile delete mode 100644 Dockerfile-onbuild.template diff --git a/.travis.yml b/.travis.yml index 83865fdb2f..5c94bc40cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/2.3/jessie/onbuild/Dockerfile b/2.3/jessie/onbuild/Dockerfile deleted file mode 100644 index 7accb9c596..0000000000 --- a/2.3/jessie/onbuild/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM ruby:2.3 - -# throw errors if Gemfile has been modified since Gemfile.lock -RUN bundle config --global frozen 1 - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -ONBUILD COPY Gemfile /usr/src/app/ -ONBUILD COPY Gemfile.lock /usr/src/app/ -ONBUILD RUN bundle install - -ONBUILD COPY . /usr/src/app diff --git a/2.4/jessie/onbuild/Dockerfile b/2.4/jessie/onbuild/Dockerfile deleted file mode 100644 index 0cc4112d64..0000000000 --- a/2.4/jessie/onbuild/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM ruby:2.4 - -# throw errors if Gemfile has been modified since Gemfile.lock -RUN bundle config --global frozen 1 - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -ONBUILD COPY Gemfile /usr/src/app/ -ONBUILD COPY Gemfile.lock /usr/src/app/ -ONBUILD RUN bundle install - -ONBUILD COPY . /usr/src/app diff --git a/Dockerfile-onbuild.template b/Dockerfile-onbuild.template deleted file mode 100644 index 3664cae175..0000000000 --- a/Dockerfile-onbuild.template +++ /dev/null @@ -1,13 +0,0 @@ -FROM ruby:%%VERSION%% - -# throw errors if Gemfile has been modified since Gemfile.lock -RUN bundle config --global frozen 1 - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -ONBUILD COPY Gemfile /usr/src/app/ -ONBUILD COPY Gemfile.lock /usr/src/app/ -ONBUILD RUN bundle install - -ONBUILD COPY . /usr/src/app diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index a24716506c..a57829f011 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -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" @@ -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 @@ -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 diff --git a/update.sh b/update.sh index a57a2f4deb..a55320b566 100755 --- a/update.sh +++ b/update.sh @@ -67,7 +67,7 @@ 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")" @@ -75,7 +75,7 @@ for version in "${versions[@]}"; do [ -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 @@ -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