This is an automated email from the ASF dual-hosted git repository.
onichols pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/1.12 by this push:
new 6f027b6 remove outdated copies of release scripts to ensure they are
not run by accident
6f027b6 is described below
commit 6f027b63c24867fe3671cf83c8c98c16be31ae1f
Author: Owen Nichols <[email protected]>
AuthorDate: Thu Sep 10 12:54:18 2020 -0700
remove outdated copies of release scripts to ensure they are not run by
accident
---
dev-tools/release/README.md | 9 +-
dev-tools/release/commit_rc.sh | 133 ---------
dev-tools/release/deploy_rc_pipeline.sh | 473 --------------------------------
dev-tools/release/finalize_release.sh | 203 --------------
dev-tools/release/license_review.sh | 362 ------------------------
dev-tools/release/prepare_rc.sh | 317 ---------------------
dev-tools/release/print_rc_email.sh | 99 -------
dev-tools/release/promote_rc.sh | 272 ------------------
8 files changed, 1 insertion(+), 1867 deletions(-)
diff --git a/dev-tools/release/README.md b/dev-tools/release/README.md
index 723740a..1acd6a5 100644
--- a/dev-tools/release/README.md
+++ b/dev-tools/release/README.md
@@ -1,11 +1,4 @@
-This directory contains scripts to help create a release of geode.
+Please run release scripts from develop only.
Not all release steps have scripts. Please follow all instructions as
documented in the wiki:
https://cwiki.apache.org/confluence/display/GEODE/Releasing+Apache+Geode
-
-Scripts
-prepare_rc.sh: Checks out the various geode repos, builds a release candidate,
and publishes to nexus staging repo
-commit_rc.sh: Pushes the tags and artifacts staged by prepare_rc.sh and then
runs print_rc_email.sh
- print_rc_email.sh: Generates an email to send to the dev list announcing a
release candidate
-promote_rc.sh: Tags an RC as the final release, builds docker images, and
starts the mirroring and brew processes
-finalize_release.sh: merges to master and cleans up pipelines and branches
diff --git a/dev-tools/release/commit_rc.sh b/dev-tools/release/commit_rc.sh
deleted file mode 100755
index 9586cd9..0000000
--- a/dev-tools/release/commit_rc.sh
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: print_rc_email.sh -v version_number -m maven_repo_id"
- echo " -v The #.#.#.RC# version number"
- echo " -m The 4 digit id of the nexus maven repo"
- exit 1
-}
-
-FULL_VERSION=""
-MAVEN=""
-
-while getopts ":v:m:" opt; do
- case ${opt} in
- v )
- FULL_VERSION=$OPTARG
- ;;
- m )
- MAVEN=$OPTARG
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [[ ${FULL_VERSION} == "" ]] || [[ ${MAVEN} == "" ]]; then
- usage
-fi
-
-if [[ $FULL_VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
- VERSION=${BASH_REMATCH[1]}
-else
- echo "Malformed version number ${FULL_VERSION}. Example valid version:
1.9.0.RC1"
- exit 1
-fi
-
-set -x
-WORKSPACE=$PWD/release-${VERSION}-workspace
-GEODE=$WORKSPACE/geode
-GEODE_EXAMPLES=$WORKSPACE/geode-examples
-GEODE_NATIVE=$WORKSPACE/geode-native
-GEODE_BENCHMARKS=$WORKSPACE/geode-benchmarks
-SVN_DIR=$WORKSPACE/dist/dev/geode
-set +x
-
-if [ -d "$GEODE" ] && [ -d "$GEODE_EXAMPLES" ] && [ -d "$GEODE_NATIVE" ] && [
-d "$GEODE_BENCHMARKS" ] && [ -d "$SVN_DIR" ] ; then
- true
-else
- echo "Please run this script from the same working directory as you
initially ran prepare_rc.sh"
- exit 1
-fi
-
-
-function failMsg {
- errln=$1
- echo "ERROR: script did NOT complete successfully"
- echo "Comment out any steps that already succeeded (approximately lines
80-$(( errln - 1 ))) and try again"
-}
-trap 'failMsg $LINENO' ERR
-
-
-echo ""
-echo "============================================================"
-echo "Publishing artifacts to apache release location..."
-echo "============================================================"
-set -x
-cd ${SVN_DIR}
-svn commit -m "Releasing Apache Geode ${FULL_VERSION} distribution"
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Adding temporary commit for geode-examples to build against staged
${FULL_VERSION}..."
-echo "============================================================"
-set -x
-cd ${GEODE_EXAMPLES}
-set +x
-sed -e 's#^geodeRepositoryUrl *=.*#geodeRepositoryUrl =
https://repository.apache.org/content/repositories/orgapachegeode-'"${MAVEN}#" \
- -e 's#^geodeReleaseUrl *=.*#geodeReleaseUrl =
https://dist.apache.org/repos/dist/dev/geode/'"${FULL_VERSION}#" -i.bak
gradle.properties
-rm gradle.properties.bak
-set -x
-git add gradle.properties
-git diff --staged
-git commit -m "temporarily point to staging repo for CI purposes"
-git push
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Pushing tags..."
-echo "============================================================"
-
-for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
- set -x
- cd ${DIR}
- git push origin rel/v${FULL_VERSION}
- set +x
-done
-
-
-echo ""
-echo "============================================================"
-echo "Done publishing the release candidate! Next steps:"
-echo "============================================================"
-cd ${GEODE}/../..
-echo "1. ${0%/*}/deploy_rc_pipeline.sh -v ${VERSION}"
-echo "2. Monitor
https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-release-${VERSION//./-}-rc
until all green"
-echo "3. Send the following email to announce the RC:"
-echo "To: [email protected]"
-echo "Subject: [VOTE] Apache Geode ${FULL_VERSION}"
-${0%/*}/print_rc_email.sh -v ${FULL_VERSION} -m ${MAVEN}
-echo ""
-which pbcopy >/dev/null && ${0%/*}/print_rc_email.sh -v ${FULL_VERSION} -m
${MAVEN} | pbcopy && echo "(copied to clipboard)"
diff --git a/dev-tools/release/deploy_rc_pipeline.sh
b/dev-tools/release/deploy_rc_pipeline.sh
deleted file mode 100755
index 6f287f5..0000000
--- a/dev-tools/release/deploy_rc_pipeline.sh
+++ /dev/null
@@ -1,473 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: deploy_rc_pipeline -v version_number"
- echo " -v The #.#.# version number"
- exit 1
-}
-
-VERSION=""
-
-while getopts ":v:" opt; do
- case ${opt} in
- v )
- VERSION=$OPTARG
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [[ ${VERSION} == "" ]]; then
- usage
-fi
-
-if [[ $VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
- true
-else
- echo "Malformed version number ${VERSION}. Example valid version: 1.9.0"
- exit 1
-fi
-
-PIPEYML=$PWD/rc-pipeline.yml
-cat << "EOF" | sed -e "s/<VERSION>/${VERSION}/" > $PIPEYML
----
-
-resources:
-- name: geode
- type: git
- source:
- branch: release/<VERSION>
- tag_filter: rel/v<VERSION>.RC*
- uri: https://github.com/apache/geode.git
-- name: geode-examples
- type: git
- source:
- branch: release/<VERSION>
- uri: https://github.com/apache/geode-examples.git
-- name: geode-native
- type: git
- source:
- branch: release/<VERSION>
- tag_filter: rel/v<VERSION>.RC*
- uri: https://github.com/apache/geode-native.git
-- name: geode-benchmarks
- type: git
- source:
- branch: release/<VERSION>
- tag_filter: rel/v<VERSION>.RC*
- uri: https://github.com/apache/geode-benchmarks.git
-- name: upthewaterspout-tests
- type: git
- source:
- branch: master
- uri: https://github.com/apache/geode.git
-
-jobs:
- - name: build-geode-from-tag
- serial: true
- plan:
- - aggregate:
- - get: geode
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- java -version
- cd geode
- ./gradlew test
- - name: build-geode-from-src-tgz
- serial: true
- plan:
- - aggregate:
- - get: geode
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode && git describe --tags | sed -e
's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- curl -s
https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-${VERSION}-src.tgz
> src.tgz
- tar xzf src.tgz
- cd apache-geode-${VERSION}-src
- java -version
- ./gradlew test
- - name: run-geode-examples-jdk11
- serial: true
- plan:
- - aggregate:
- - get: geode-examples
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 11
- inputs:
- - name: geode-examples
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- cd geode-examples
- java -version
- ./gradlew runAll
- - name: run-geode-examples-from-src-tar-gz-jdk8
- serial: true
- plan:
- - aggregate:
- - get: geode-examples
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode-examples
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode-examples && git describe --tags | sed -e
's#^rel/v##' -e 's#-.*##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- STAGING_MAVEN=$(cat geode-examples/gradle.properties | grep
geodeRepositoryUrl | awk '{print $3}')
- curl -s
https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-examples-${VERSION}.tar.gz
> src.tgz
- tar xzf src.tgz
- cd apache-geode-examples-${VERSION}
- java -version
- ./gradlew
-PgeodeReleaseUrl=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}
-PgeodeRepositoryUrl=${STAGING_MAVEN} build runAll
- - name: build-geode-native-from-tag
- serial: true
- plan:
- - aggregate:
- - get: geode-native
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode-native
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode-native && git describe --tags | sed -e
's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- #use geode from binary dist
- curl -s
https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-${VERSION}.tgz
> geode-bin.tgz
- tar xzf geode-bin.tgz
- # needed to get cmake >= 3.12
- echo 'APT::Default-Release "stable";' >>
/etc/apt/apt.conf.d/99defaultrelease
- echo 'deb http://ftp.de.debian.org/debian/ stable main
contrib non-free' >> /etc/apt/sources.list.d/stable.list
- echo 'deb-src http://ftp.de.debian.org/debian/ stable main
contrib non-free' >> /etc/apt/sources.list.d/stable.list
- echo 'deb http://security.debian.org/ stable/updates
main contrib non-free' >> /etc/apt/sources.list.d/stable.list
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install
--no-install-recommends -y cmake openssl doxygen build-essential libssl-dev
zlib1g-dev
- cd geode-native
- mkdir build
- cd build
- cmake .. -DGEODE_ROOT=$PWD/../../apache-geode-${VERSION}
- cmake --build . -- -j 4
- cmake --build . --target docs -- -j 4
- cmake --build . --target install -- -j 4
- - name: build-geode-native-from-src-tar-gz
- serial: true
- plan:
- - aggregate:
- - get: geode-native
- trigger: true
- - get: geode
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode-native
- - name: geode
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode-native && git describe --tags | sed -e
's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- # build geode from source
- cd geode
- ./gradlew build -x test -x javadoc -x rat -x pmdMain
- cd ..
- # needed to get cmake >= 3.12
- echo 'APT::Default-Release "stable";' >>
/etc/apt/apt.conf.d/99defaultrelease
- echo 'deb http://ftp.de.debian.org/debian/ stable main
contrib non-free' >> /etc/apt/sources.list.d/stable.list
- echo 'deb-src http://ftp.de.debian.org/debian/ stable main
contrib non-free' >> /etc/apt/sources.list.d/stable.list
- echo 'deb http://security.debian.org/ stable/updates
main contrib non-free' >> /etc/apt/sources.list.d/stable.list
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install
--no-install-recommends -y cmake openssl doxygen build-essential libssl-dev
zlib1g-dev
- curl -s
https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-native-${VERSION}-src.tar.gz
> src.tgz
- tar xzf src.tgz
- cd apache-geode-native*
- mkdir build
- cd build
- cmake ..
-DGEODE_ROOT=$PWD/../../geode/geode-assembly/build/install/apache-geode
- cmake --build . -- -j 4
- cmake --build . --target docs -- -j 4
- cmake --build . --target install -- -j 4
- - name: upthewaterspout
- serial: true
- plan:
- - aggregate:
- - get: geode
- trigger: true
- - get: upthewaterspout-tests
- - get: geode-examples
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode
- - name: upthewaterspout-tests
- - name: geode-examples
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode && git describe --tags | sed -e
's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- STAGING_MAVEN=$(cat geode-examples/gradle.properties | grep
geodeRepositoryUrl | awk '{print $3}')
- cd upthewaterspout-tests
- curl -s https://dist.apache.org/repos/dist/dev/geode/KEYS > KEYS
- gpg --import KEYS
- java -version
- ./gradlew build -PmavenURL=${STAGING_MAVEN}
-PdownloadURL=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/
-Pversion=${FULL_VERSION}
- - name: benchmarks-test
- serial: true
- plan:
- - get: geode-benchmarks
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode-benchmarks
- platform: linux
- run:
- path: /bin/sh
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode-benchmarks && git describe --tags | sed
-e 's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- curl -s
https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/apache-geode-benchmarks-${VERSION}-src.tgz
> src.tgz
- tar xzf src.tgz
- cd apache-geode-benchmarks-${VERSION}-src
- java -version
- mkdir -p ~/.ssh
- ssh-keygen -m PEM -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- apt-get update
- apt-get install openssh-server --no-install-recommends -y
- echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- service ssh start
- ./gradlew build test
- - name: verify-expected-files-and-keys
- serial: true
- plan:
- - aggregate:
- - get: geode
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode
- platform: linux
- run:
- path: /bin/bash
- args:
- - -ec
- - |
- set -ex
- FULL_VERSION=$(cd geode && git describe --tags | sed -e
's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- curl -s https://dist.apache.org/repos/dist/dev/geode/KEYS > KEYS
- gpg --import KEYS
- url=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}
- function verifyArtifactSignature {
- file=$1
- echo Verifying $file...
- asc=${file}.asc
- sha=${file}.sha$2
- sum=sha${2}sum
- curl -s $url/$file > $file
- curl -s $url/$asc > $asc
- curl -s $url/$sha > $sha
- gpg --verify $asc
- $sum -c $sha
- echo $file >> exp
- echo $asc >> exp
- echo $sha >> exp
- }
- verifyArtifactSignature apache-geode-${VERSION}-src.tgz 256
- verifyArtifactSignature apache-geode-${VERSION}.tgz 256
- verifyArtifactSignature apache-geode-examples-${VERSION}.tar.gz
256
- verifyArtifactSignature
apache-geode-native-${VERSION}-src.tar.gz 512
- verifyArtifactSignature
apache-geode-benchmarks-${VERSION}-src.tgz 256
- curl -s ${url}/ | awk '/>..</{next}/<li>/{gsub(/
*<[^>]*>/,"");print}' | sort > actual-file-list
- sort < exp > expected-file-list
- set +x
- echo ""
- if diff -q expected-file-list actual-file-list ; then
- echo "The file list at $url matches what is expected and all
signatures were verified :)"
- else
- echo "Expected:"
- cat expected-file-list
- echo ""
- echo "Actual:"
- cat actual-file-list
- echo ""
- echo "Diff:"
- diff expected-file-list actual-file-list
- exit 1
- fi
- - name: verify-no-binaries
- serial: true
- plan:
- - aggregate:
- - get: geode
- trigger: true
- - task: validate
- timeout: 1h
- config:
- image_resource:
- type: docker-image
- source:
- repository: bellsoft/liberica-openjdk-debian
- tag: 8
- inputs:
- - name: geode
- platform: linux
- run:
- path: /bin/bash
- args:
- - -ec
- - |
- set -e
- FULL_VERSION=$(cd geode && git describe --tags | sed -e
's#^rel/v##')
- VERSION=$(echo $FULL_VERSION|sed -e 's/\.RC.*//')
- url=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}
- BINARY_EXTENSIONS="jar|war|class|exe|dll|o|so|obj|bin|out|pyc"
- echo "Source artifacts should not contain any files ending
in$(echo "|${BINARY_EXTENSIONS}"|sed 's/[^a-z]/ ./g')"
- echo ""
- function verifyNoBinaries {
- file=$1
- echo ""
- echo Checking $file...
- curl -s $url/$file | tar tvzf - | egrep
'\.('"${BINARY_EXTENSIONS}"')$' | tee -a bins
- }
- verifyNoBinaries apache-geode-${VERSION}-src.tgz
- verifyNoBinaries apache-geode-examples-${VERSION}.tar.gz
- verifyNoBinaries apache-geode-native-${VERSION}-src.tar.gz
- verifyNoBinaries apache-geode-benchmarks-${VERSION}-src.tgz
- echo ""
- echo ""
- if grep -q . bins ; then
- echo Binary files were found!
- exit 1
- else
- echo All good
- fi
-EOF
-fly -t concourse.apachegeode-ci.info-main login --team-name main
--concourse-url https://concourse.apachegeode-ci.info/
-fly -t concourse.apachegeode-ci.info-main set-pipeline -p
apache-release-${VERSION//./-}-rc -c $PIPEYML
-rm $PIPEYML
diff --git a/dev-tools/release/finalize_release.sh
b/dev-tools/release/finalize_release.sh
deleted file mode 100755
index 2801c99..0000000
--- a/dev-tools/release/finalize_release.sh
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: finalize_release.sh -v version_number -g your_github_username"
- echo " -v The #.#.# version number to finalize"
- echo " -g Your github username"
- exit 1
-}
-
-VERSION=""
-
-while getopts ":v:g:" opt; do
- case ${opt} in
- v )
- VERSION=$OPTARG
- ;;
- g )
- GITHUB_USER=$OPTARG
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [[ ${VERSION} == "" ]] || [[ ${GITHUB_USER} == "" ]] ; then
- usage
-fi
-
-if [[ $VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
- true
-else
- echo "Malformed version number ${VERSION}. Example valid version: 1.9.0"
- exit 1
-fi
-
-set -x
-WORKSPACE=$PWD/release-${VERSION}-workspace
-GEODE=$WORKSPACE/geode
-GEODE_DEVELOP=$WORKSPACE/geode-develop
-GEODE_EXAMPLES=$WORKSPACE/geode-examples
-GEODE_NATIVE=$WORKSPACE/geode-native
-GEODE_BENCHMARKS=$WORKSPACE/geode-benchmarks
-SVN_RELEASE_DIR=$WORKSPACE/dist/release/geode
-set +x
-
-if [ -d "$GEODE" ] && [ -d "$GEODE_DEVELOP" ] && [ -d "$GEODE_EXAMPLES" ] && [
-d "$GEODE_NATIVE" ] && [ -d "$GEODE_BENCHMARKS" ] && [ -d "$SVN_RELEASE_DIR" ]
; then
- true
-else
- echo "Please run this script from the same working directory as you
initially ran prepare_rc.sh"
- exit 1
-fi
-
-
-function failMsg {
- errln=$1
- echo "ERROR: script did NOT complete successfully"
- echo "Comment out any steps that already succeeded (approximately lines
80-$(( errln - 1 ))) and try again"
-}
-trap 'failMsg $LINENO' ERR
-
-
-echo ""
-echo "============================================================"
-echo "Destroying pipelines"
-echo "============================================================"
-set -x
-cd ${0%/*}/../../ci/pipelines/meta
-DEVELOP_META=$(pwd)
-cd ${GEODE}
-fly -t concourse.apachegeode-ci.info-main login --team-name main
--concourse-url https://concourse.apachegeode-ci.info/
-${DEVELOP_META}/destroy_pipelines.sh
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Removing temporary commit from geode-examples..."
-echo "============================================================"
-set -x
-cd ${GEODE_EXAMPLES}
-git pull
-set +x
-sed -e 's#^geodeRepositoryUrl *=.*#geodeRepositoryUrl =#' \
- -e 's#^geodeReleaseUrl *=.*#geodeReleaseUrl =#' -i.bak gradle.properties
-rm gradle.properties.bak
-set -x
-git add gradle.properties
-git diff --staged
-git commit -m 'Revert "temporarily point to staging repo for CI purposes"'
-git push
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Merging to master"
-echo "============================================================"
-for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
- set -x
- cd ${DIR}
- git fetch origin
- git checkout release/${VERSION}
- #this creates a merge commit that will then be ff-merged to master, so
word it from that perspective
- git merge -s ours origin/master -m "Replacing master with contents of
release/${VERSION}"
- git checkout master
- git merge release/${VERSION}
- git push origin master
- set +x
-done
-
-
-echo ""
-echo "============================================================"
-echo "Destroying release branches"
-echo "============================================================"
-for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
- set -x
- cd ${DIR}
- git push origin --delete release/${VERSION}
- git branch -D release/${VERSION}
- set +x
-done
-
-
-echo ""
-echo "============================================================"
-echo "Updating 'old' versions"
-echo "============================================================"
-set -x
-cd ${GEODE_DEVELOP}
-git pull
-git remote add myfork [email protected]:${GITHUB_USER}/geode.git || true
-git checkout -b add-${VERSION}-to-old-versions
-set +x
-#before:
-# '1.9.0'].each {
-#after:
-# '1.9.0',
-# '1.10.0'].each {
-sed -e "s/].each/,\\
- '${VERSION}'].each/" \
- -i.bak settings.gradle
-rm settings.gradle.bak
-set -x
-git add settings.gradle
-git diff --staged
-git commit -m "add ${VERSION} to old versions"
-git push -u myfork
-set -x
-
-
-echo ""
-echo "============================================================"
-echo "Removing old versions from mirrors"
-echo "============================================================"
-set -x
-cd $SVN_RELEASE_DIR
-svn update --set-depth immediates
-#identify the latest patch release for "N-2" (the latest 3 major.minor
releases), remove anything else from mirrors (all releases remain available on
non-mirrored archive site)
-RELEASES_TO_KEEP=3
-set +x
-ls | awk -F. '/KEYS/{next}{print 1000000*$1+1000*$2+$3,$1"."$2"."$3}'| sort -n
| awk '{mm=$2;sub(/\.[^.]*$/,"",mm);V[mm]=$2}END{for(v in V){print V[v]}}'|tail
-$RELEASES_TO_KEEP > ../keep
-echo Keeping releases: $(cat ../keep)
-(ls | grep -v KEYS; cat ../keep ../keep)|sort|uniq -u|while read oldVersion; do
- set -x
- svn rm $oldVersion
- svn commit -m "remove $oldVersion from mirrors (it is still available at
http://archive.apache.org/dist/geode)"
- set +x
- [ -z "$DID_REMOVE" ] || DID_REMOVE="${DID_REMOVE} and "
- DID_REMOVE="${DID_REMOVE}${oldVersion}"
-done
-rm ../keep
-
-
-echo ""
-echo "============================================================"
-echo "Done finalizing the release!"
-echo "============================================================"
-cd ${GEODE}/../..
-echo "Don't forget to:"
-echo "- Go to
https://github.com/${GITHUB_USER}/geode/pull/new/add-${VERSION}-to-old-versions
and create the pull request"
-[ -z "$DID_REMOVE" ] || echo "- Update to non-mirror links for old release
$DID_REMOVE that was removed from mirrors"
-echo "- Publish documentation to docs site"
-[ "${VERSION##*.}" -ne 0 ] || echo "- Ask for a volunteer to begin the chore
of updating 3rd-party dependency versions on develop"
-echo "- Send announce email"
diff --git a/dev-tools/release/license_review.sh
b/dev-tools/release/license_review.sh
deleted file mode 100755
index a595f8c..0000000
--- a/dev-tools/release/license_review.sh
+++ /dev/null
@@ -1,362 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: license_review.sh -v version_number_or_tgz [-p
previous_version_number_or_tgz]"
- echo " -v The #.#.#.RC# or #.#.# version number to review -or- a path
or URL to .tgz -or- 'HEAD'"
- echo " -p The #.#.#.RC# or #.#.# version number to compare against -or-
a path or URL to .tgz"
- echo " -n No license check (useful if you just want the version
comparison)"
- echo " -s No source license check (just check the binary license)"
- exit 1
-}
-
-
-while getopts ":v:p:ns" opt; do
- case ${opt} in
- v )
- NEW_VERSION=$OPTARG
- ;;
- p )
- OLD_VERSION=$OPTARG
- ;;
- n )
- SKIP_LICENSES=true
- ;;
- s )
- SKIP_SRC_LICENSE=true
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [ -z "${NEW_VERSION}" ] ; then
- usage
-fi
-
-WORKSPACE=$(PWD)/license_tmp
-DOWNLOAD=${WORKSPACE}/download
-EXTRACT=${WORKSPACE}/extracted
-mkdir -p ${DOWNLOAD}
-mkdir -p ${EXTRACT}
-root=$0
-root=${root%/dev-tools*}
-
-if [ "$NEW_VERSION" = "HEAD" ] ; then
- licFromWs=true
- rm -Rf $root/geode-assembly/build/distributions
-fi
-
-
-function resolve() {
- [ -n "$1" ] || return
- spec=$1
- suffix=$2
- if [ "HEAD" = "$spec" ] ; then
- [ "${suffix}" = "-src" ] && target=srcDistTar || target=distTar
- (cd $root && ./gradlew ${target} 1>&2)
- spec=$root/geode-assembly/build/distributions/$(cd
$root/geode-assembly/build/distributions && ls -t | grep
apache-geode-.*-SNAPSHOT${suffix}.tgz | tail -1)
- [ -r "$spec" ] || echo "Build not found: $spec" 1>&2
- [ -r "$spec" ]
- fi
-
- if [[ $spec =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
- mmp=$(echo $spec | sed 's/.RC.*//')
- #bare RC version -> RC url
-
spec=https://dist.apache.org/repos/dist/dev/geode/${spec}/apache-geode-${mmp}${suffix}.tgz
- elif [[ $spec =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
- #bare released version -> release url
-
spec=https://downloads.apache.org/geode/${spec}/apache-geode-${spec}${suffix}.tgz
- elif echo "$spec" | grep -q '^http.*tgz$' ; then
- #tgz url
- echo "$spec" | grep -q -- "${suffix}.tgz$" || return
- elif [ -r "$spec" ] && echo "$spec" | grep -q 'tgz$' ; then
- #tgz file present locally
- echo "$spec" | grep -q -- "${suffix}.tgz$" || return
- else
- #unsupported
- return
- fi
-
- #download if url (and not already downloaded)
- if echo "$spec" | grep -q '^http.*tgz$' ; then
- filename=$(echo $spec | sed 's#.*/##')
- [ -r ${DOWNLOAD}/$filename ] || curl -L "$spec" > ${DOWNLOAD}/$filename
- spec=${DOWNLOAD}/$filename
- fi
-
- #extract it (if not already extracted)
- dirname=$(echo $spec | sed -e 's#.*/##' -e 's#.tgz$##')
- [ "${licFromWs}" = "true" ] && rm -Rf ${EXTRACT}/$dirname
- [ -d ${EXTRACT}/$dirname ] || tar xzf $spec -C ${EXTRACT}
- [ -d ${EXTRACT}/$dirname ] && echo ${EXTRACT}/$dirname
-}
-
-NEW_DIR=$(resolve $NEW_VERSION)
-
-if [ -z "${NEW_DIR}" ] || [ ! -d "${NEW_DIR}" ] ; then
- usage
-fi
-
-if [ "${licFromWs}" = "true" ] && ! [ "$SKIP_LICENSES" = "true" ] && ! [
"$SKIP_SRC_LICENSE" = "true" ] ; then
- NEW_SRC_DIR=$(resolve $NEW_VERSION -src)
-fi
-
-function banner() {
- echo ""
- echo "$@" | sed 's/./=/g'
- echo "$@"
- echo "$@" | sed 's/./=/g'
-}
-
-function listJarsInWar() {
- war=$1
- jar tvf $war | awk '/.jar$/{print "'"$war"'/"$8}'
-}
-
-function extractLicense() {
- war=$1
- rm -Rf tmpl
- mkdir tmpl
- cd tmpl
- jar xf ../$war META-INF/LICENSE
- cd ..
- cp tmpl/META-INF/LICENSE $2
- rm -Rf tmpl
-}
-
-function generateList() {
- dir=$1
- banner "Listing 3rd-party deps in ${dir##*/}"
-
- #also extract geode jar licenses for later checking
- (cd $dir; find . -name '*.jar' | egrep '(geode|gfsh)-' | sort | sed
's#^./##' | while read geodejar ; do
- extractLicense $geodejar ${geodejar%.jar}.LICENSE
- done)
-
- echo "**** ${dir##*/} jars ****" | tr '[:lower:]-' '[:upper:] ' >
$dir/report1
- (cd $dir; find . -name '*.jar' | grep -v geode- | grep -v gfsh- | sort | sed
's#^./##' | tee -a report1)
-
- echo "**** ${dir##*/} wars ****" | tr '[:lower:]-' '[:upper:] ' >
$dir/report2
- (cd $dir; find . -name '*.war' | sort | sed 's#^./##' | while read war ; do
- listJarsInWar $war | sed 's#-[v0-9][-0-9.SNAPSHOT]*[.]#.#' | sort
- extractLicense $war ${war%.war}.LICENSE
- done | tee -a report2)
-}
-
-generateList $NEW_DIR
-if [ -n "${OLD_VERSION}" ] ; then
- OLD_DIR=$(resolve $OLD_VERSION)
- generateList $OLD_DIR
-
- banner "Diffing 3rd-party deps changes from ${OLD_DIR##*/} to ${NEW_DIR##*/}"
- for REPORT in report1 report2 ; do
- diff -y -W $(tput cols) $OLD_DIR/$REPORT $NEW_DIR/$REPORT | grep '[<|>]'
- done
-fi
-
-[ "$SKIP_LICENSES" = "true" ] && exit 0
-
-banner "Checking that all binary licenses are identical"
-sizes=$(find $NEW_DIR -name '*LICENSE' | xargs wc -c | grep -v total | awk
'{print $1}' | sort -u | wc -l)
-if [ $sizes -gt 1 ] ; then
- echo "NOT all LICENSES are the same:"
- (cd $NEW_DIR; find * -name '*LICENSE' | xargs wc -c | grep -v total | sort)
- result=1
-else
- echo "All Good!"
-fi
-
-function isApache2() {
- apache="HikariCP
-accessors-smart
-byte-buddy
-classmate
-commons-beanutils
-commons-codec
-commons-collections
-commons-digester
-commons-fileupload
-commons-io
-commons-lang3
-commons-logging
-commons-math3
-commons-modeler
-commons-text
-commons-validator
-content-type
-error_prone_annotations
-failureaccess
-fastutil
-findbugs-annotations
-geo
-guava
-grumpy-
-httpclient
-httpcore
-j2objc-annotations
-jackson-
-jcip-annotations
-jna
-json-path
-json-smart
-jsr305
-jetty-
-jgroups
-jna-
-lang-tag
-listenablefuture
-log4j-
-lucene-
-mapstruct
-micrometer-core
-netty-all
-nimbus-jose-jwt
-oauth2-oidc-sdk
-rmiio
-shiro-
-snappy
-spring-
-springfox-
-swagger-annotations
-swagger-models"
- echo "$1" | egrep -q "(mx4j-remote|jaxb-api|$(echo -n "$apache" | tr '\n'
'|'))"
-}
-function shortenDep() {
- echo "$1" | sed \
- -e 's/-api//' \
- -e 's/-impl//' \
- -e 's/-java//' \
- -e 's/shiro-.*/shiro-*/' \
- -e 's/jackson-.*/shiro-*/' \
- -e 's/jetty-.*/jetty-*/' \
- -e 's/jna-.*/jna-*/' \
- -e 's/lucene-.*/lucene-*/' \
- -e 's/log4j-.*/log4j-*/' \
- -e 's/mx4j-.*/mx4j*/' \
- -e 's/spring-.*/spring-*/' \
- -e 's/springfox-.*/springfox-*/'
-}
-for REPORT in report1 report2 ; do
- [ "$REPORT" = "report1" ] && topic=JAR || topic=WAR
- if [ "${licFromWs}" = "true" ] ; then
- LICENSE=${root}/geode-assembly/src/main/dist/LICENSE
- else
- [ "$REPORT" = "report1" ] && LICENSE=${NEW_DIR}/LICENSE ||
LICENSE=${NEW_DIR}/tools/Pulse/$(cd ${NEW_DIR}/tools/Pulse; ls | grep LICENSE)
- fi
- LICENSE=${LICENSE#./}
- banner "Comparing $topic dep versions in ${NEW_DIR##*/} to $LICENSE"
- rm -f missing-$REPORT apache-$REPORT
- touch missing-$REPORT apache-$REPORT
- tail -n +2 $NEW_DIR/$REPORT | sed -e 's#.*/##' -e 's/.jar//' | sed
's/-\([0-9]\)/ \1/' | sort -u | grep -v '^ra$' | while read dep ver; do
- if isApache2 $dep ; then
- echo $dep $ver >> apache-$REPORT
- else
- echo $(shortenDep $dep) $ver
- fi
- done | sort -u | while read dep ver ; do
- if grep -qi "${dep//-/.}.*$ver" $LICENSE ; then
- echo "$dep $ver Found (and version matches)"
- elif grep -qi $dep $LICENSE ; then
- match="$(grep -i $dep $LICENSE | grep -v License | head -1)"
- if echo $match | grep -q '[0-9][0-9]*[.][0-9][0-9]*' ; then
- echo "$dep FOUND WITH A DIFFERENT VERSION, PLEASE UPDATE TO $ver:" >>
missing-$REPORT
- echo "$match" >> missing-$REPORT
- else
- echo "$dep $ver probably found (without version):"
- echo "$match"
- fi
- else
- echo "$LICENSE FAILS TO MENTION $dep v$ver" >> missing-$REPORT
- fi
- done
- echo $(wc -l < apache-$REPORT) "deps are licensed under Apache 2.0 (no need
to mention individually)"
- rm apache-$REPORT
- if [ $(wc -l < missing-$REPORT) -eq 0 ] ; then
- echo "All Good!"
- else
- cat missing-$REPORT
- rm missing-$REPORT
- result=1
- fi
-done
-
-function checkMissing() {
- rm -f missing
- touch missing
- grep '^ - ' | sed -e 's/^ - //' -e 's/, .*//' -e 's/ (.*//' -e 's/s*
v.*//' -e 's/ /.?/g' | while read f; do
- if (cd ${root} && git grep -Eqi "$f" -- ':!LICENSE' ':!**/LICENSE'
':!NOTICE' ':!**/NOTICE') ; then
- true
- #echo "${f//\?/} found"
- else
- echo "${f//\?/} appears to be unused. Please remove from $1" >> missing
- fi
- done
- if [ $(wc -l < missing) -eq 0 ] ; then
- echo "All Good!"
- rm missing
- else
- cat missing
- rm missing
- return 1
- fi
-}
-
-if [ "${licFromWs}" = "true" ] ; then
- banner "Checking that binary license is a superset of src license"
- SLICENSE=${root}/LICENSE
- BLICENSE=${root}/geode-assembly/src/main/dist/LICENSE
- if diff $SLICENSE $BLICENSE | grep -q '^<' ; then
- echo $(diff $SLICENSE $BLICENSE | grep '^<' | wc -l) "lines appear in
$SLICENSE that were not found in $BLICENSE."
- echo "Please ensure the binary license is a strict superset of the source
license."
- echo "(diff $SLICENSE $BLICENSE)"
- result=1
- else
- echo "All Good!"
- fi
-
- banner "Checking that binary license is correct"
- if diff -q ${BLICENSE} ${NEW_DIR}/LICENSE ; then
- echo "All Good!"
- else
- echo "Incorrect LICENSE in binary distribution"
- echo "Expected:" $(wc -c ${BLICENSE})
- echo "Actual:" $(wc -c ${NEW_DIR}/LICENSE)
- fi
-
- if ! [ "$SKIP_SRC_LICENSE" = "true" ] ; then
- banner "Checking that source license is correct"
- if diff -q ${SLICENSE} ${NEW_SRC_DIR}/LICENSE ; then
- echo "All Good!"
- else
- echo "Incorrect LICENSE in source distribution"
- echo "Expected:" $(wc -c ${SLICENSE})
- echo "Actual:" $(wc -c ${NEW_SRC_DIR}/LICENSE)
- fi
-
- banner "Checking references in source license"
- cat $SLICENSE | checkMissing $SLICENSE
-
- banner "Checking references in binary license"
- cat $SLICENSE $SLICENSE $BLICENSE | sort | uniq -u | checkMissing $BLICENSE
- fi
-fi
-
-exit $result
diff --git a/dev-tools/release/prepare_rc.sh b/dev-tools/release/prepare_rc.sh
deleted file mode 100755
index c3012d9..0000000
--- a/dev-tools/release/prepare_rc.sh
+++ /dev/null
@@ -1,317 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: prepare_rc -v version_number -k signing_key -a
apache_ldap_username"
- echo " -v The #.#.#.RC# version number"
- echo " -k Your 8 digit GPG key id (the last 8 digits of your gpg
fingerprint)"
- echo " -a Your apache LDAP username (that you use to log in to
https://id.apache.org)"
- exit 1
-}
-
-checkCommand() {
- COMMAND=$1
- if ! [[ -x "$(command -v $COMMAND)" ]]; then
- echo "$COMMAND must be installed"
- exit 1
- fi
-}
-
-FULL_VERSION=""
-SIGNING_KEY=""
-APACHE_USERNAME=""
-
-while getopts ":v:k:a:" opt; do
- case ${opt} in
- v )
- FULL_VERSION=$OPTARG
- ;;
- k )
- SIGNING_KEY=$OPTARG
- ;;
- a )
- APACHE_USERNAME=$OPTARG
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [[ ${FULL_VERSION} == "" ]] || [[ ${SIGNING_KEY} == "" ]] || [[
${APACHE_USERNAME} == "" ]]; then
- usage
-fi
-
-if [[ $SIGNING_KEY =~ ^[0-9A-Fa-f]{8}$ ]]; then
- true
-else
- echo "Malformed signing key ${SIGNING_KEY}. Example valid key: ABCD1234"
- exit 1
-fi
-
-if [[ $FULL_VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
- VERSION=${BASH_REMATCH[1]}
-else
- echo "Malformed version number ${FULL_VERSION}. Example valid version:
1.9.0.RC1"
- exit 1
-fi
-
-checkCommand gpg
-checkCommand cmake
-checkCommand svn
-checkCommand doxygen
-
-echo ""
-echo "============================================================"
-echo "Checking gpg... (you will be prompted to enter passphase)"
-echo "============================================================"
-SECRING=~/.gnupg/secring.gpg
-! [ -r $SECRING ] || SECRING=/dev/null
-if gpg --export-secret-keys > ${SECRING} && echo "1234" | gpg -o /dev/null
--local-user ${SIGNING_KEY} -as - ; then
- echo "You entered the correct passphrase; proceeding."
- echo "Please note, you will still need to enter it a few more times."
- echo "PLEASE NOTE, the very last prompt will be for your apache password
(not gpg). Pay attention as the prompts look very similar."
-else
- echo "Hmm, gpg seems unhappy. Check that you entered correct passphrase or
refer to release wiki for troubleshooting."
- exit 1
-fi
-
-
-set -x
-WORKSPACE=$PWD/release-${VERSION}-workspace
-GEODE=$WORKSPACE/geode
-GEODE_DEVELOP=$WORKSPACE/geode-develop
-GEODE_EXAMPLES=$WORKSPACE/geode-examples
-GEODE_NATIVE=$WORKSPACE/geode-native
-GEODE_BENCHMARKS=$WORKSPACE/geode-benchmarks
-BREW_DIR=$WORKSPACE/homebrew-core
-SVN_DIR=$WORKSPACE/dist/dev/geode
-set +x
-
-echo ""
-echo "============================================================"
-echo "Cleaning workspace directory..."
-echo "============================================================"
-set -x
-rm -rf $WORKSPACE
-mkdir -p $WORKSPACE
-cd $WORKSPACE
-set +x
-
-
-function failMsg {
- errln=$1
- echo "ERROR: script did NOT complete successfully"
- echo "Comment out any steps that already succeeded (approximately lines
124-$(( errln - 1 ))) and try again"
-}
-trap 'failMsg $LINENO' ERR
-
-
-echo ""
-echo "============================================================"
-echo "Cloning repositories..."
-echo "============================================================"
-set -x
-git clone --branch release/${VERSION} [email protected]:apache/geode.git
-git clone --branch develop [email protected]:apache/geode.git geode-develop
-git clone --branch release/${VERSION} [email protected]:apache/geode-examples.git
-git clone --branch release/${VERSION} [email protected]:apache/geode-native.git
-git clone --branch release/${VERSION}
[email protected]:apache/geode-benchmarks.git
-git clone --branch master [email protected]:Homebrew/homebrew-core.git
-
-svn checkout https://dist.apache.org/repos/dist --depth empty
-svn update --set-depth immediates --parents dist/release/geode
-svn update --set-depth infinity --parents dist/dev/geode
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Building geode..."
-echo "============================================================"
-set -x
-cd ${GEODE}
-git clean -fdx && ./gradlew build -x test publishToMavenLocal -Paskpass
-Psigning.keyId=${SIGNING_KEY}
-Psigning.secretKeyRingFile=${HOME}/.gnupg/secring.gpg
-set +x
-
-
-if [ "${VERSION##*.RC}" -gt 1 ] ; then
- echo ""
- echo "============================================================"
- echo "Removing previous RC's temporary commit from geode-examples..."
- echo "============================================================"
- set -x
- cd ${GEODE_EXAMPLES}
- git pull
- set +x
- sed -e 's#^geodeRepositoryUrl *=.*#geodeRepositoryUrl =#' \
- -e 's#^geodeReleaseUrl *=.*#geodeReleaseUrl =#' -i.bak
gradle.properties
- rm gradle.properties.bak
- set -x
- git add gradle.properties
- git diff --staged
- git commit -m 'Revert "temporarily point to staging repo for CI purposes"'
- set +x
-fi
-
-
-echo ""
-echo "============================================================"
-echo "Building geode-examples..."
-echo "============================================================"
-set -x
-cd ${GEODE_EXAMPLES}
-git clean -dxf && ./gradlew -PsignArchives
-PgeodeReleaseUrl="file://${GEODE}/geode-assembly/build/geode-assembly/build/distributions/apache-geode-${VERSION}"
-PgeodeRepositoryUrl="file://${HOME}/.m2/repository"
-Psigning.keyId=${SIGNING_KEY}
-Psigning.secretKeyRingFile=${HOME}/.gnupg/secring.gpg build
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Building geode-native..."
-echo "============================================================"
-set -x
-cd ${GEODE_NATIVE}
-mkdir build
-which brew >/dev/null && OPENSSL_ROOT_DIR=$(brew --prefix openssl) ||
OPENSSL_ROOT_DIR=$(which openssl)
-cd ${GEODE_NATIVE}/build
-cmake .. -DPRODUCT_VERSION=${VERSION} -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR
-DGEODE_ROOT=${GEODE}/geode-assembly/build/install/apache-geode
-cpack -G TGZ --config CPackSourceConfig.cmake
-NCTAR=apache-geode-native-${VERSION}-src.tar.gz
-mkdir repkg-temp
-cd repkg-temp
-tar xzf ../${NCTAR}
-rm ../${NCTAR}
-mv apache-geode-native apache-geode-native-${VERSION}
-tar czf ../${NCTAR} *
-cd ..
-rm -Rf repkg-temp
-gpg --armor -u ${SIGNING_KEY} -b ${NCTAR}
-
-if which shasum >/dev/null; then
- SHASUM=shasum
- SHASUM_OPTS="-a 512"
-else
- SHASUM=sha512sum
- SHASUM_OPTS=""
-fi
-${SHASUM} ${SHASUM_OPTS} ${NCTAR} > ${NCTAR}.sha512
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Building geode-benchmarks..."
-echo "============================================================"
-set -x
-cd ${GEODE_BENCHMARKS}
-BMDIR=apache-geode-benchmarks-${VERSION}-src
-BMTAR=${BMDIR}.tgz
-git clean -dxf
-mkdir ../${BMDIR}
-cp -r .travis.yml * ../${BMDIR}
-tar czf ${BMTAR} -C .. ${BMDIR}
-rm -Rf ../${BMDIR}
-gpg --armor -u ${SIGNING_KEY} -b ${BMTAR}
-if which shasum >/dev/null; then
- SHASUM=shasum
- SHASUM_OPTS="-a 256"
-else
- SHASUM=sha256sum
- SHASUM_OPTS=""
-fi
-${SHASUM} ${SHASUM_OPTS} ${BMTAR} > ${BMTAR}.sha256
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Tagging the release candidate in each repository. The tags will not be
pushed yet..."
-echo "============================================================"
-for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
- set -x
- cd ${DIR}
- git tag -s -u ${SIGNING_KEY} rel/v${FULL_VERSION} -m "Release candidate
${FULL_VERSION}"
- set +x
-done
-
-
-echo ""
-echo "============================================================"
-echo "Copying artifacts to svn directory for publication. The artifacts will
not be committed..."
-echo "============================================================"
-set -x
-cd ${SVN_DIR}
-svn rm ${VERSION}.RC* &>/dev/null || true
-cp ${GEODE}/KEYS .
-mkdir ${FULL_VERSION}
-cp ${GEODE}/geode-assembly/build/distributions/* ${FULL_VERSION}
-cp ${GEODE_EXAMPLES}/build/distributions/* ${FULL_VERSION}
-cp ${GEODE_NATIVE}/build/apache-geode-native-${VERSION}* ${FULL_VERSION}
-cp ${GEODE_BENCHMARKS}/apache-geode-benchmarks-${VERSION}* ${FULL_VERSION}
-set +x
-
-# verify all files are signed. sometimes gradle "forgets" to make the .asc
file
-for f in ${FULL_VERSION}/*.tgz ${FULL_VERSION}/*.tar.gz ; do
- if ! [ -r $f.sha256 ] && ! [ -r $f.sha512 ] ; then
- echo missing $f.sha256 or $f.sha512
- exit 1
- fi
- if ! [ -r $f.asc ] ; then
- set -x
- gpg --armor -u ${SIGNING_KEY} -b $f
- set +x
- if ! [ -r $f.asc ] ; then
- echo missing $f.asc
- exit 1
- fi
- fi
- size=$(ls -l $f | awk '{print $5}')
- if [ $size -lt 10000 ] ; then
- echo $f file size is only $size bytes, that seems suspicious.
- exit 1
- fi
-done
-
-set -x
-svn add ${FULL_VERSION}
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Publishing artifacts to nexus staging manager..."
-echo "PLEASE NOTE, the 2nd prompt will be for your apache (not gpg) password.
Pay attention as the prompts look very similar."
-echo "============================================================"
-set -x
-cd ${GEODE}
-./gradlew publish -Paskpass -Psigning.keyId=${SIGNING_KEY}
-Psigning.secretKeyRingFile=${HOME}/.gnupg/secring.gpg
-PmavenUsername=${APACHE_USERNAME}
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Done preparing the release and staging to nexus! Next steps:"
-echo "============================================================"
-cd ${GEODE}/../..
-echo "1. Go to https://repository.apache.org, login as ${APACHE_USERNAME}, and
click on Staging Repositories"
-echo "2. If there is a prior ${VERSION} RC, select it and click Drop."
-echo '3. Make a note of the 4-digit ID of the current ("implicitly created")
staging repo.'
-echo '4. Select the current staging repo and click Close.'
-echo '5. Wait ~15 minutes for status to become "Closed"'
-echo "6. Run ${0%/*}/commit_rc.sh -v ${FULL_VERSION} -m
<4-DIGIT-ID-NOTED-ABOVE>"
diff --git a/dev-tools/release/print_rc_email.sh
b/dev-tools/release/print_rc_email.sh
deleted file mode 100755
index 0e3c05d..0000000
--- a/dev-tools/release/print_rc_email.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: print_rc_email.sh -v version_number -m maven_repo_id"
- echo " -v The #.#.#.RC# version number"
- echo " -m The 4 digit id of the nexus maven repo"
- exit 1
-}
-
-FULL_VERSION=""
-MAVEN=""
-
-while getopts ":v:m:" opt; do
- case ${opt} in
- v )
- FULL_VERSION=$OPTARG
- ;;
- m )
- MAVEN=$OPTARG
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [[ ${FULL_VERSION} == "" ]] || [[ ${MAVEN} == "" ]]; then
- usage
-fi
-
-if [[ $FULL_VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
- VERSION=${BASH_REMATCH[1]}
-else
- echo "Malformed version number ${FULL_VERSION}. Example valid number -
1.9.0.RC1"
- exit 1
-fi
-
-#support mac or linux date arithmetic syntax
-DEADLINE=$(date --date '+5 days' '+%a, %B %d %Y' 2>/dev/null || date -v +5d
"+%a, %B %d %Y" 2>/dev/null || echo "<5 days from now>")
-
-cat << EOF
-Hello Geode Dev Community,
-
-This is a release candidate for Apache Geode version ${FULL_VERSION}.
-Thanks to all the community members for their contributions to this release!
-
-Please do a review and give your feedback, including the checks you performed.
-
-Voting deadline:
-3PM PST ${DEADLINE}.
-
-Please note that we are voting upon the source tag:
-rel/v${FULL_VERSION}
-
-Release notes:
-https://cwiki.apache.org/confluence/display/GEODE/Release+Notes#ReleaseNotes-${VERSION}
-
-Source and binary distributions:
-https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}/
-
-Maven staging repo:
-https://repository.apache.org/content/repositories/orgapachegeode-${MAVEN}
-
-GitHub:
-https://github.com/apache/geode/tree/rel/v${FULL_VERSION}
-https://github.com/apache/geode-examples/tree/rel/v${FULL_VERSION}
-https://github.com/apache/geode-native/tree/rel/v${FULL_VERSION}
-https://github.com/apache/geode-benchmarks/tree/rel/v${FULL_VERSION}
-
-Pipelines:
-https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-release-${VERSION//./-}-main
-https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-release-${VERSION//./-}-rc
-
-Geode's KEYS file containing PGP keys we use to sign the release:
-https://github.com/apache/geode/blob/develop/KEYS
-
-Command to run geode-examples:
-./gradlew
-PgeodeReleaseUrl=https://dist.apache.org/repos/dist/dev/geode/${FULL_VERSION}
-PgeodeRepositoryUrl=https://repository.apache.org/content/repositories/orgapachegeode-${MAVEN}
build runAll
-
-Regards
-$(git config --get user.name)
-EOF
diff --git a/dev-tools/release/promote_rc.sh b/dev-tools/release/promote_rc.sh
deleted file mode 100755
index cdd09b2..0000000
--- a/dev-tools/release/promote_rc.sh
+++ /dev/null
@@ -1,272 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-
-usage() {
- echo "Usage: promote_rc.sh -v version_number -k your_full_gpg_public_key
-g your_github_username"
- echo " -v The #.#.#.RC# version number to ship"
- echo " -k Your 40-digit GPG fingerprint"
- echo " -g Your github username"
- exit 1
-}
-
-FULL_VERSION=""
-SIGNING_KEY=""
-GITHUB_USER=""
-
-while getopts ":v:k:g:" opt; do
- case ${opt} in
- v )
- FULL_VERSION=$OPTARG
- ;;
- k )
- SIGNING_KEY=$OPTARG
- ;;
- g )
- GITHUB_USER=$OPTARG
- ;;
- \? )
- usage
- ;;
- esac
-done
-
-if [[ ${FULL_VERSION} == "" ]] || [[ ${SIGNING_KEY} == "" ]] || [[
${GITHUB_USER} == "" ]]; then
- usage
-fi
-
-SIGNING_KEY=$(echo $SIGNING_KEY|sed 's/[^0-9A-Fa-f]//g')
-if [[ $SIGNING_KEY =~ ^[0-9A-Fa-f]{40}$ ]]; then
- true
-else
- echo "Malformed signing key ${SIGNING_KEY}. Example valid key: '0000 0000
1111 1111 2222 2222 3333 3333 ABCD 1234'"
- exit 1
-fi
-
-if [[ $FULL_VERSION =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.(RC[0-9]+)$ ]]; then
- VERSION=${BASH_REMATCH[1]}
-else
- echo "Malformed version number ${FULL_VERSION}. Example valid version:
1.9.0.RC1"
- exit 1
-fi
-
-set -x
-WORKSPACE=$PWD/release-${VERSION}-workspace
-GEODE=$WORKSPACE/geode
-GEODE_EXAMPLES=$WORKSPACE/geode-examples
-GEODE_NATIVE=$WORKSPACE/geode-native
-GEODE_BENCHMARKS=$WORKSPACE/geode-benchmarks
-BREW_DIR=$WORKSPACE/homebrew-core
-SVN_DIR=$WORKSPACE/dist/dev/geode
-set +x
-
-if [ -d "$GEODE" ] && [ -d "$GEODE_EXAMPLES" ] && [ -d "$GEODE_NATIVE" ] && [
-d "$GEODE_BENCHMARKS" ] && [ -d "$BREW_DIR" ] && [ -d "$SVN_DIR" ] ; then
- true
-else
- echo "Please run this script from the same working directory as you
initially ran prepare_rc.sh"
- exit 1
-fi
-
-
-function failMsg {
- errln=$1
- echo "ERROR: script did NOT complete successfully"
- echo "Comment out any steps that already succeeded (approximately lines
94-$(( errln - 1 ))) and try again"
-}
-trap 'failMsg $LINENO' ERR
-
-
-echo ""
-echo "============================================================"
-echo "Releasing artifacts to mirror sites..."
-echo "(note: must be logged in to svn as a PMC member or this will fail)"
-echo "============================================================"
-set -x
-cd ${SVN_DIR}/../..
-svn update
-svn mv dev/geode/${FULL_VERSION} release/geode/${VERSION}
-cp dev/geode/KEYS release/geode/KEYS
-svn commit -m "Releasing Apache Geode ${VERSION} distribution"
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Tagging ${FULL_VERSION} as ${VERSION} and pushing tags..."
-echo "============================================================"
-for DIR in ${GEODE} ${GEODE_EXAMPLES} ${GEODE_NATIVE} ${GEODE_BENCHMARKS} ; do
- set -x
- cd ${DIR}
- git tag -s -u ${SIGNING_KEY} rel/v${VERSION} -m "Apache Geode v${VERSION}
release" rel/v${FULL_VERSION}
- git push origin rel/v${VERSION}
- set +x
-done
-
-
-echo ""
-echo "============================================================"
-echo "Checking that artifacts have published to www.apache.org..."
-echo "============================================================"
-for suffix in "" .asc .sha256 ; do
- file=apache-geode-${VERSION}.tgz
- url=https://www.apache.org/dist/geode/${VERSION}/${file}${suffix}
- expectedsize=$(cd ${SVN_DIR}/../../release/geode/${VERSION}; ls -l
${file}${suffix} | awk '{print $5}')
- actualsize=0
- while [ $expectedsize -ne $actualsize ] ; do
- while ! curl -s --output /dev/null --head --fail "$url"; do
- echo -n .
- sleep 3
- done
- actualsize=$(curl -s --head "$url" | grep "Content-Length" | awk '{print
$2}' | tr -d '\r')
- done
- echo "$url exists and is correct size"
-done
-
-
-echo ""
-echo "============================================================"
-echo "Updating brew"
-echo "============================================================"
-set -x
-cd ${BREW_DIR}/Formula
-git pull
-git remote add myfork [email protected]:${GITHUB_USER}/homebrew-core.git || true
-if ! git fetch myfork ; then
- echo "Please fork https://github.com/Homebrew/homebrew-core"
- exit 1
-fi
-git checkout -b apache-geode-${VERSION}
-GEODE_SHA=$(awk '{print $1}' <
$WORKSPACE/dist/release/geode/${VERSION}/apache-geode-${VERSION}.tgz.sha256)
-set +x
-sed -e 's# *url ".*# url
"https://www.apache.org/dyn/closer.cgi?path=geode/'"${VERSION}"'/apache-geode-'"${VERSION}"'.tgz"#'
\
- -e '/ *mirror ".*www.*/d' \
- -e 's# *mirror ".*archive.*# mirror
"https://archive.apache.org/dist/geode/'"${VERSION}"'/apache-geode-'"${VERSION}"'.tgz"\
- mirror
"https://www.apache.org/dist/geode/'"${VERSION}"'/apache-geode-'"${VERSION}"'.tgz"#'
\
- -e 's/ *sha256 ".*/ sha256 "'"${GEODE_SHA}"'"/' \
- -i.bak apache-geode.rb
-rm apache-geode.rb.bak
-set -x
-git add apache-geode.rb
-git diff --staged
-git commit -m "apache-geode ${VERSION}"
-git push -u myfork
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Updating Geode Dockerfile"
-echo "============================================================"
-set -x
-cd ${GEODE}/docker
-git pull -r
-set +x
-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}/" \
- -i.bak Dockerfile
-rm Dockerfile.bak
-set -x
-git add Dockerfile
-git diff --staged
-git commit -m "apache-geode ${VERSION}"
-git push
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Updating Native Dockerfile"
-echo "============================================================"
-set -x
-cd ${GEODE_NATIVE}/docker
-git pull -r
-set +x
-sed -e
"/wget.*closer.*apache-geode-/s#http.*filename=geode#https://www.apache.org/dist/geode#"
\
- -e
"/wget.*closer.*apache-rat-/s#http.*filename=creadur#https://archive.apache.org/dist/creadur#"
\
- -e "s/^ENV GEODE_VERSION.*/ENV GEODE_VERSION ${VERSION}/" \
- -i.bak Dockerfile
-rm Dockerfile.bak
-set -x
-git add Dockerfile
-git diff --staged
-git commit -m "apache-geode ${VERSION}"
-git push
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Building Geode docker image"
-echo "============================================================"
-set -x
-cd ${GEODE}/docker
-docker build .
-docker build -t apachegeode/geode:${VERSION} .
-docker build -t apachegeode/geode:latest .
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Building Native docker image"
-echo "============================================================"
-set -x
-cd ${GEODE_NATIVE}/docker
-docker build .
-docker build -t apachegeode/geode-native-build:${VERSION} .
-docker build -t apachegeode/geode-native-build:latest .
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Publishing Geode docker image"
-echo "============================================================"
-set -x
-cd ${GEODE}/docker
-docker login
-docker push apachegeode/geode:${VERSION}
-docker push apachegeode/geode:latest
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Publishing Native docker image"
-echo "============================================================"
-set -x
-cd ${GEODE_NATIVE}/docker
-docker push apachegeode/geode-native-build:${VERSION}
-docker push apachegeode/geode-native-build:latest
-set +x
-
-
-echo ""
-echo "============================================================"
-echo "Done promoting release artifacts!"
-echo "============================================================"
-cd ${GEODE}/../..
-echo "Next steps:"
-echo "1. Click 'Release' in http://repository.apache.org/ (if you haven't
already)"
-echo "2. Go to
https://github.com/${GITHUB_USER}/homebrew-core/pull/new/apache-geode-${VERSION}
and submit the pull request"
-echo "3. Validate docker image: docker run -it -p 10334:10334 -p 7575:7575 -p
1099:1099 apachegeode/geode"
-echo "4. Bulk-transition JIRA issues fixed in this release to Closed"
-echo "5. Wait overnight for apache mirror sites to sync"
-echo "6. Confirm that your homebrew PR passed its PR checks and was merged to
master"
-echo "7. Run ${0%/*}/finalize_release.sh -v ${VERSION}"