From 9ff39d12361e668657413b8cbfc9558b71795a96 Mon Sep 17 00:00:00 2001 From: Owen Nichols <34043438+onichols-pivotal@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:07:51 -0700 Subject: [PATCH] GEODE-9529: fix release scripts (benchmark baseline, docker) (#6779) * update benchmark baseline on support branch on new minor release * make it clear that Dockerfile on develop is a template, and can only be used to build a Geode image from a released support branch * change end-of-support message to version-based not time-based --- dev-tools/release/promote_rc.sh | 20 ++++++++++++++++---- docker/Dockerfile | 15 ++++++--------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/dev-tools/release/promote_rc.sh b/dev-tools/release/promote_rc.sh index 4d881997e3de..0617e2120f6b 100755 --- a/dev-tools/release/promote_rc.sh +++ b/dev-tools/release/promote_rc.sh @@ -218,6 +218,7 @@ sed -e "s/^ENV GEODE_GPG.*/ENV GEODE_GPG ${SIGNING_KEY}/" \ -e "s/^ENV GEODE_VERSION.*/ENV GEODE_VERSION ${VERSION}/" \ -e "s/^ENV GEODE_SHA256.*/ENV GEODE_SHA256 ${GEODE_SHA}/" \ -e "s/ha.pool.sks-keyservers.net/keyserver.ubuntu.com/" \ + -e '/This is a TEMPLATE/d' \ -i.bak Dockerfile rm Dockerfile.bak set -x @@ -423,7 +424,7 @@ set +x echo "" echo "============================================================" -echo "Updating 'old' versions on support/$VERSION_MM" +echo "Updating 'old' versions and Benchmarks baseline on support/$VERSION_MM" echo "============================================================" set -x cd ${GEODE} @@ -435,10 +436,22 @@ sed -e "s/].each/,\\ '${VERSION}'].each/" \ -i.bak settings.gradle rm settings.gradle.bak +PATCH=${VERSION##*.} +if [ $PATCH -eq 0 ] ; then + #also update benchmark baseline for support branch to its new minor + sed \ + -e "s/^ baseline_version:.*/ baseline_version: '${VERSION}'/" \ + -e "s/^ baseline_version_default:.*/ baseline_version_default: '${VERSION}'/" \ + -i.bak ci/pipelines/shared/jinja.variables.yml + rm ci/pipelines/shared/jinja.variables.yml.bak + BENCHMSG2=" and set as Benchmarks baseline" + set -x + git add ci/pipelines/shared/jinja.variables.yml +fi set -x git add settings.gradle git diff --staged --color | cat -git commit -m "add ${VERSION} to old versions on support/$VERSION_MM" +git commit -m "add ${VERSION} to old versions${BENCHMSG2} on support/$VERSION_MM" git push set +x @@ -492,8 +505,7 @@ MAJOR="${VERSION_MM%.*}" MINOR="${VERSION_MM#*.}" PATCH="${VERSION##*.}" [ "${PATCH}" -ne 0 ] || echo "10. Ask on the dev list for a volunteer to begin the chore of updating 3rd-party dependency versions on develop (see dev-tools/dependencies/README.md)" -M=$(date --date '+18 months' '+%a, %B %d %Y' 2>/dev/null || date -v +9m "+%a, %B %d %Y" 2>/dev/null || echo "18 months from now") -[ "${PATCH}" -ne 0 ] || echo "11. Mark your calendar for $M (assuming we release Geode ${MAJOR}.$((MINOR + 3)) on that day) to run ${0%/*}/end_of_support.sh -v ${VERSION_MM}" +[ "${PATCH}" -ne 0 ] || [ "${MINOR}" -lt 15 ] || echo "11. In accordance with Geode's N-2 support policy, the time has come to ${0%/*}/end_of_support.sh -v ${MAJOR}.$((MINOR - 3))" [ "${PATCH}" -ne 0 ] || [ -n "$LATER" ] || echo "12. Log in to https://hub.docker.com/repository/docker/apachegeode/geode and update the latest Dockerfile linktext and url to ${VERSION_MM}" echo "If there are any support branches between ${VERSION_MM} and develop, manually cherry-pick '${VERSION}' bumps to those branches of geode and geode-native." echo "Bump support pipeline to ${VERSION_MM}.$(( PATCH + 1 )) by plussing BumpPatch in https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-support-${VERSION_MM//./-}-main?group=Semver%20Management" diff --git a/docker/Dockerfile b/docker/Dockerfile index f8027b3a9e20..4e6d9fcc5f72 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,26 +16,23 @@ FROM bellsoft/liberica-openjdk-alpine:8 +RUN echo "This is a TEMPLATE, DO NOT build from this Dockerfile. Instead checkout master or any released support/x.y branch." ; exit 1 + # runtime dependencies RUN apk add --no-cache \ bash \ ncurses -# pub 4096R/ABF4396F 2018-04-12 [expires: 2022-04-12] -# 8763 31B4 5A97 E382 D1BD FB44 4482 0F9C ABF4 396F -# uid [ undef ] Mike Stolz -# sub 4096R/3871E6AD 2018-04-12 [expires: 2022-04-12] -ENV GEODE_GPG DB5476815A475574577D442B468A4800EAFB2498 -# TODO does this change per-release like other Apache projects? (and thus needs to be a list of full fingerprints from a KEYS file instead?) +ENV GEODE_GPG $$PLACEHOLDER$$ ENV GEODE_HOME /geode ENV PATH $PATH:$GEODE_HOME/bin # https://geode.apache.org/releases/ -ENV GEODE_VERSION 1.9.0 +ENV GEODE_VERSION $$PLACEHOLDER$$ # Binaries TGZ SHA-256 # https://dist.apache.org/repos/dist/release/geode/VERSION/apache-geode-VERSION.tgz.sha256 -ENV GEODE_SHA256 8794808ebc89bc855f0b989b32e91e890d446cfd058e123f6ccb9e12597c1c4f +ENV GEODE_SHA256 $$PLACEHOLDER$$ # http://apache.org/dyn/closer.cgi/geode/1.3.0/apache-geode-1.3.0.tgz @@ -50,7 +47,7 @@ RUN set -eux; \ ; do \ target="$(basename "$file")"; \ for url in \ - "https://www.apache.org/dyn/closer.lua/$file?action=download" + "https://www.apache.org/dyn/closer.lua/$file?action=download" \ "https://downloads.apache.org/$file" \ "https://archive.apache.org/dist/$file" \ ; do \