You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/01/17 03:02:34 UTC

[1/3] git commit: Added a script to tag a release candidate and upload the jar.

Updated Branches:
  refs/heads/master 5c478106e -> 10ff89653


Added a script to tag a release candidate and upload the jar.

Review: https://reviews.apache.org/r/16492


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/10ff8965
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/10ff8965
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/10ff8965

Branch: refs/heads/master
Commit: 10ff89653a1e483d0d3dc899beb3db30742418b8
Parents: 5e61d07
Author: Vinod Kone <vi...@twitter.com>
Authored: Fri Dec 27 14:43:41 2013 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Jan 16 17:48:05 2014 -0800

----------------------------------------------------------------------
 support/tag.sh | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/10ff8965/support/tag.sh
----------------------------------------------------------------------
diff --git a/support/tag.sh b/support/tag.sh
new file mode 100755
index 0000000..58a75cd
--- /dev/null
+++ b/support/tag.sh
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+# This script should be used to tag the current HEAD as a release
+# candidate and publish the tag to the mesos repo. In addition this
+# script also publishes the corresponding mesos jar to a Maven repo.
+
+set -e
+
+# Use 'atexit' for cleanup.
+. $(dirname ${0})/atexit.sh
+
+# Use colors for errors.
+. $(dirname ${0})/colors.sh
+
+test ${#} -eq 2 || \
+  { echo "Usage: `basename ${0}` [version] [candidate]"; exit 1; }
+
+VERSION=${1}
+CANDIDATE=${2}
+TAG="${VERSION}-rc${CANDIDATE}"
+
+echo "${GREEN}Tagging the HEAD as ${TAG}${NORMAL}"
+
+read -p "Hit enter to continue ... "
+
+WORK_DIR=`mktemp -d /tmp/mesos-tag-XXXX`
+atexit "rm -rf ${WORK_DIR}"
+
+# Get the absolulte path of the local git clone.
+MESOS_GIT_LOCAL=$(cd "$(dirname $0)"/..; pwd)
+
+pushd ${WORK_DIR}
+
+# Make a shallow clone from the local git repository.
+git clone --shared ${MESOS_GIT_LOCAL} mesos
+
+pushd mesos
+
+# Ensure configure.ac has the correct version.
+grep "\[mesos\], \[${VERSION}\]" configure.ac
+
+echo "${GREEN}Updating configure.ac to include the release candidate.${NORMAL}"
+sed -i '' "s/\[mesos\], \[.*\]/[mesos], [${TAG}]/" configure.ac
+
+# Build mesos.
+./bootstrap
+mkdir build
+pushd build
+../configure --disable-optimize
+make -j3 check
+
+# Build the distribution.
+# TODO(vinod): Also upload the distribution to svn dev repo?
+# Currently this is tricky because support/vote.sh uploads the
+# distribution in svn dev repo under mesos-${TAG} directory.
+make -j3 dist
+
+# Build and deploy the jar.
+make maven-install
+mvn deploy -f src/java/mesos.pom
+
+echo "${GREEN}Successfully deployed the jar to staging maven repository ...${NORMAL}"
+
+read  -p "Please *close* and *release* the staging repository and hit enter to continue ..."
+
+input=""
+while [ ! ${input:-n} = "y" ]; do
+  read -p "Have you released the maven repository? (y/n): " input
+  [ ${input:-n} = "y" ] || echo "Please release the staging maven repository before continuing"
+done
+
+popd # build
+
+echo "${GREEN}Creating ${TAG} tag at HEAD...${NORMAL}"
+
+git tag ${TAG}
+
+echo "${GREEN}Pushing the git tag to the repository...${NORMAL}"
+
+MESOS_GIT_URL="https://git-wip-us.apache.org/repos/asf/mesos.git"
+
+git push ${MESOS_GIT_URL} ${TAG}
+
+popd # mesos
+popd # ${WORK_DIR}
+
+echo "${GREEN}Success!${NORMAL}"
+
+exit 0


[3/3] git commit: Added a script to automate voting a release candidate.

Posted by vi...@apache.org.
Added a script to automate voting a release candidate.

Review: https://reviews.apache.org/r/16476


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/77d4c5a5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/77d4c5a5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/77d4c5a5

Branch: refs/heads/master
Commit: 77d4c5a59b0507a8e6a8ee02849a811280ecd2ac
Parents: 5c47810
Author: Vinod Kone <vi...@twitter.com>
Authored: Thu Dec 26 17:31:20 2013 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Jan 16 17:48:05 2014 -0800

----------------------------------------------------------------------
 support/vote.sh | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 158 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/77d4c5a5/support/vote.sh
----------------------------------------------------------------------
diff --git a/support/vote.sh b/support/vote.sh
new file mode 100755
index 0000000..95aba2b
--- /dev/null
+++ b/support/vote.sh
@@ -0,0 +1,158 @@
+#!/bin/bash
+
+# This script should be used for calling a vote for a release candidate.
+# In addition to publishing the source tarball to svn repo this script
+# also deploys the corresponding jar to a staging Maven repo.
+
+set -e
+
+# Use 'atexit' for cleanup.
+. $(dirname ${0})/atexit.sh
+
+# Use colors for errors.
+. $(dirname ${0})/colors.sh
+
+test ${#} -eq 2 || \
+  { echo "Usage: `basename ${0}` [version] [candidate]"; exit 1; }
+
+VERSION=${1}
+CANDIDATE=${2}
+TAG="${VERSION}-rc${CANDIDATE}"
+
+echo "${GREEN}Voting for mesos-${VERSION} candidate ${CANDIDATE}${NORMAL}"
+
+read -p "Hit enter to continue ... "
+
+MESOS_GIT_URL="https://git-wip-us.apache.org/repos/asf/mesos.git"
+
+WORK_DIR=`mktemp -d /tmp/mesos-vote-XXXX`
+atexit "rm -rf ${WORK_DIR}"
+
+pushd ${WORK_DIR}
+
+echo "${GREEN}Checking out ${TAG}${NORMAL}"
+
+# First checkout the release tag.
+git clone --depth 1 --branch ${TAG} ${MESOS_GIT_URL}
+
+pushd mesos
+
+# Ensure configure.ac has the correct version.
+grep "\[mesos\], \[${VERSION}\]" configure.ac
+
+# Build mesos.
+./bootstrap
+mkdir build
+pushd build
+../configure --disable-optimize
+make -j3 check
+
+# Build and deploy the jar.
+make maven-install
+mvn deploy -f src/java/mesos.pom
+
+echo "${GREEN}Successfully deployed the jar to staging maven repository ...${NORMAL}"
+
+# Loop here until the user enters a URL.
+MAVEN_REPO=""
+while [ -z ${MAVEN_REPO} ]; do
+  read  -p "Please *close* the staging repository and provide its URL here: " MAVEN_REPO
+done
+
+# Build the distribution.
+echo "${GREEN}Building the distribution ...${NORMAL}"
+make -j3 dist
+
+TARBALL=mesos-${VERSION}.tar.gz
+
+echo "${GREEN}Signing the distribution ...${NORMAL}"
+
+# Sign the tarball.
+gpg --armor --output ${TARBALL}.asc --detach-sig ${TARBALL}
+
+echo "${GREEN}Creating a MD5 checksum...${NORMAL}"
+
+# Create MD5 checksum.
+gpg --print-md MD5 ${TARBALL} > ${TARBALL}.md5
+
+SVN_DEV_REPO="https://dist.apache.org/repos/dist/dev/mesos"
+SVN_DEV_LOCAL="${WORK_DIR}/dev"
+
+echo "${GREEN}Checking out svn dev repo ...${NORMAL}"
+
+# Note '--depth=empty' ensures none of the existing files
+# in the repo are checked out, saving time and space.
+svn co --depth=empty ${SVN_DEV_REPO} ${SVN_DEV_LOCAL}
+
+echo "${GREEN}Uploading the artifacts (the distribution," \
+  "signature, and MD5) ...${NORMAL}"
+
+RELEASE_DIRECTORY="${SVN_DEV_LOCAL}/${TAG}"
+mkdir ${RELEASE_DIRECTORY}
+mv ${TARBALL} ${TARBALL}.asc ${TARBALL}.md5 ${RELEASE_DIRECTORY}
+
+popd # build
+popd # mesos
+
+pushd ${SVN_DEV_LOCAL}
+
+svn add ${TAG}
+svn commit -m "Adding mesos-${TAG}."
+
+popd # ${SVN_DEV_LOCAL}
+
+popd # ${WORK_DIR}
+
+echo "${GREEN}Success! Now send the following VOTE email ...${NORMAL}"
+
+# Create the email body template to be sent to {dev,user}@mesos.apache.org.
+MESSAGE=$(cat <<__EOF__
+To: dev@mesos.apache.org, user@mesos.apache.org
+Subject: [VOTE] Release Apache Mesos ${VERSION} (rc${CANDIDATE})
+
+Hi all,
+
+Please vote on releasing the following candidate as Apache Mesos ${VERSION}.
+
+
+${VERSION} includes the following:
+--------------------------------------------------------------------------------
+*****Announce major features here*****
+*****Announce major bug fixes here*****
+
+The CHANGELOG for the release is available at:
+https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=blob_plain;f=CHANGELOG;hb=${TAG}
+--------------------------------------------------------------------------------
+
+The candidate for Mesos ${VERSION} release is available at:
+${SVN_DEV_REPO}/mesos-${TAG}/${TARBALL}
+
+The tag to be voted on is ${TAG}:
+https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=commit;h=${TAG}
+
+The MD5 checksum of the tarball can be found at:
+${SVN_DEV_REPO}/mesos-${TAG}/${TARBALL}.md5
+
+The signature of the tarball can be found at:
+${SVN_DEV_REPO}/mesos-${TAG}/${TARBALL}.asc
+
+The PGP key used to sign the release is here:
+https://dist.apache.org/repos/dist/release/mesos/KEYS
+
+The JAR is up in Maven in a staging repository here:
+${MAVEN_REPO}
+
+Please vote on releasing this package as Apache Mesos ${VERSION}!
+
+The vote is open until `date -v+3d` and passes if a majority of at least 3 +1 PMC votes are cast.
+
+[ ] +1 Release this package as Apache Mesos ${VERSION}
+[ ] -1 Do not release this package because ...
+
+Thanks,
+__EOF__
+)
+
+echo "${MESSAGE}"
+
+exit 0


[2/3] git commit: Updated support/release.sh script to upload artifacts after vote.

Posted by vi...@apache.org.
Updated support/release.sh script to upload artifacts after vote.

Review: https://reviews.apache.org/r/16487


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5e61d071
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5e61d071
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5e61d071

Branch: refs/heads/master
Commit: 5e61d07116b9c6719dba07837d675663997c8539
Parents: 77d4c5a
Author: Vinod Kone <vi...@twitter.com>
Authored: Fri Dec 27 11:56:29 2013 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Jan 16 17:48:05 2014 -0800

----------------------------------------------------------------------
 support/release.sh | 133 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 95 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5e61d071/support/release.sh
----------------------------------------------------------------------
diff --git a/support/release.sh b/support/release.sh
index 1be2a5f..1f2c9d8 100755
--- a/support/release.sh
+++ b/support/release.sh
@@ -1,69 +1,126 @@
 #!/bin/bash
 
+# This script should be used *after* a successful vote to publish a
+# release. In addition to publishing the source tarball to svn repo
+# this script also publishes the corresponding jar to Maven.
+
+set -e
+
+# Use 'atexit' for cleanup.
+. $(dirname ${0})/atexit.sh
+
 # Use colors for errors.
 . $(dirname ${0})/colors.sh
 
 test ${#} -eq 2 || \
   { echo "Usage: `basename ${0}` [version] [candidate]"; exit 1; }
 
-# TODO(benh): Figure out a way to get version number and release
-# candidate automagically.
 VERSION=${1}
 CANDIDATE=${2}
+TAG="${VERSION}-rc${CANDIDATE}"
 
-echo "${GREEN}Releasing mesos-${VERSION} candidate ${CANDIDATE}${NORMAL}"
+echo "${GREEN}Releasing mesos-${TAG} as mesos-${VERSION}${NORMAL}"
 
 read -p "Hit enter to continue ... "
 
-make distcheck || \
-  { echo "${RED}Failed to check the distribution${NORMAL}"; exit 1; }
+WORK_DIR=`mktemp -d /tmp/mesos-release-XXXX`
+atexit "rm -rf ${WORK_DIR}"
 
-TARBALL=mesos-${VERSION}.tar.gz
+pushd ${WORK_DIR}
 
-echo "${GREEN}Now let's sign the distribution ...${NORMAL}"
+SVN_DEV_REPO="https://dist.apache.org/repos/dist/dev/mesos"
 
-# Sign the tarball.
-gpg --armor --output ${TARBALL}.asc --detach-sig ${TARBALL} || \
-  { echo "${RED}Failed to sign the distribution${NORMAL}"; exit 1; }
+echo "${GREEN}Downloading the artifacts from the dev repo ...${NORMAL}"
+svn export ${SVN_DEV_REPO}/${TAG}
 
-echo "${GREEN}And let's create a MD5 checksum...${NORMAL}"
+SVN_RELEASE_REPO="https://dist.apache.org/repos/dist/release/mesos"
+SVN_RELEASE_LOCAL="${WORK_DIR}/release"
 
-# Create MD5 checksum.
-gpg --print-md MD5 ${TARBALL} > ${TARBALL}.md5 || \
-  { echo "${RED}Failed to create MD5 for distribution${NORMAL}"; exit 1; }
+echo "${GREEN}Checking out svn release repo ...${NORMAL}"
 
-DIRECTORY=public_html/mesos-${VERSION}-RC${CANDIDATE}
+# Note '--depth=empty' ensures none of the existing files
+# in the repo are checked out, saving time and space.
+svn co --depth=empty ${SVN_RELEASE_REPO} ${SVN_RELEASE_LOCAL}
 
-echo "${GREEN}Now let's upload our artifacts (the distribution," \
-  "signature, and MD5) ...${NORMAL}"
+echo "${GREEN}Uploading the artifacts (the distribution," \
+  "signature, and MD5) to the release repo ${NORMAL}"
 
-ssh people.apache.org "mkdir -p ${DIRECTORY}" || \
-  { echo "${RED}Failed to create remote directory${NORMAL}"; exit 1; }
+mv ${TAG} ${SVN_RELEASE_LOCAL}/${VERSION}
 
-{ scp ${TARBALL} people.apache.org:${DIRECTORY}/ && \
-  scp ${TARBALL}.asc people.apache.org:${DIRECTORY}/ && \
-  scp ${TARBALL}.md5 people.apache.org:${DIRECTORY}/; } || \
-  { echo "${RED}Failed to copy distribution artifacts${NORMAL}"; exit 1; }
+pushd ${SVN_RELEASE_LOCAL}
 
-echo "${GREEN}Now let's make the artifacts world readable ...${NORMAL}"
+svn add ${VERSION}
+svn commit -m "Adding mesos-${VERSION}."
 
-{ ssh people.apache.org "chmod a+r ${DIRECTORY}/${TARBALL}" && \
-  ssh people.apache.org "chmod a+r ${DIRECTORY}/${TARBALL}.asc" && \
-  ssh people.apache.org "chmod a+r ${DIRECTORY}/${TARBALL}.md5"; } || \
-  { echo "${RED}Failed to change permissions of artifacts${NORMAL}";
-    exit 1; }
+popd # ${SVN_RELEASE_LOCAL}
 
-echo "${GREEN}Now we'll create a git tag ...${NORMAL}"
+popd # ${WORK_DIR}
 
-MESSAGE="Tag for ${VERSION}-rc${CANDIDATE}."
-TAG="${VERSION}-rc${CANDIDATE}"
-git tag -m "${MESSAGE}" ${TAG} || \
-  { echo "${RED}Failed to create git tag${NORMAL}"; exit 1; }
+echo "${GREEN}Tagging ${TAG} as ${VERSION} ${NORMAL}"
+
+git tag ${VERSION} ${TAG}
+
+echo "${GREEN}Pushing the git tag to the repository...${NORMAL}"
+
+MESOS_GIT_URL="https://git-wip-us.apache.org/repos/asf/mesos.git"
+
+git push ${MESOS_GIT_URL} ${VERSION}
+
+echo "${GREEN}Successfully published artifacts to svn release repo ...${NORMAL}"
+
+echo "${GREEN}Please *release* the staging maven repository that contains the mesos jar ...${NORMAL}"
+
+input=""
+while [ ! ${input:-n} = "y" ]; do
+  read -p "Have you released the maven repository? (y/n): " input
+  [ ${input:-n} = "y" ] || echo "Please release the staging maven repository before continuing"
+done
+
+echo "${GREEN}Success! Now send the following RESULT VOTE email ...${NORMAL}"
+
+# Create the email body template to be sent to {dev,user}@mesos.apache.org.
+MESSAGE=$(cat <<__EOF__
+To: dev@mesos.apache.org, user@mesos.apache.org
+Subject: [RESULT][VOTE] Release Apache Mesos ${VERSION} (rc${CANDIDATE})
+
+Hi all,
+
+The vote for Mesos ${VERSION} (rc${CANDIDATE}) has passed with the
+following votes.
+
++1 (Binding)
+------------------------------
+***
+***
+***
+
++1 (Non-binding)
+------------------------------
+***
+***
+***
+
+There were no 0 or -1 votes.
+
+Please find the release at:
+${SVN_RELEASE_REPO}/mesos-${VERSION}
+
+It is recommended to use a mirror to download the release:
+http://www.apache.org/dyn/closer.cgi
+
+The CHANGELOG for the release is available at:
+https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=blob_plain;f=CHANGELOG;hb=${VERSION}
+
+The mesos-${VERSION}.jar has been released to:
+https://repository.apache.org
+
+The website (http://mesos.apache.org) will be updated shortly to
+reflect this release.
 
-echo "${GREEN}Finally, we'll push the git tag to the repository...${NORMAL}"
+Thanks,
+__EOF__
+)
 
-REPOSITORY="https://git-wip-us.apache.org/repos/asf/mesos.git"
-git push ${REPOSITORY} ${TAG} || \
-  { echo "${RED}Failed to push git tag to the repo${NORMAL}"; exit 1; }
+echo "${MESSAGE}"
 
 exit 0