aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfarr...@apache.org
Subject git commit: AURORA-78: automate and enforce release workflow
Date Wed, 30 Apr 2014 18:55:31 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 843d19da7 -> 953bf836b


AURORA-78: automate and enforce release workflow

Adds scripts to generate the CHANGELOG from JIRA, create the
release candidate, generate the release candidate VOTE email draft,
generate the release from the release candidate and the RESULT VOTE
email draft. docs/committers.md added with process flow details.

Testing Done:
Have been running these in dry-run mode, getting to the point where I can not test the release
script as it requires things to be published to the dev dist. Have some changes in release
script that are pending, but wanted to get feedback on the release-candidate and docs.

Bugs closed: AURORA-78

Reviewed at https://reviews.apache.org/r/19710/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/953bf836
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/953bf836
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/953bf836

Branch: refs/heads/master
Commit: 953bf836b066e13236400f6f6f488bbec135f74a
Parents: 843d19d
Author: Jake Farrell <jfarrell@apache.org>
Authored: Wed Apr 30 14:54:54 2014 -0400
Committer: jfarrell <jfarrell@apache.org>
Committed: Wed Apr 30 14:54:54 2014 -0400

----------------------------------------------------------------------
 build-support/release/changelog                | 152 ++++++++++
 build-support/release/release                  | 251 +++++++++++++++++
 build-support/release/release-candidate        | 291 ++++++++++++++++++++
 build-support/release/tag-release              | 155 -----------
 build-support/release/verify-release-candidate |  59 ++++
 docs/committers.md                             |  49 ++++
 docs/contributing.md                           |  14 -
 7 files changed, 802 insertions(+), 169 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/build-support/release/changelog
----------------------------------------------------------------------
diff --git a/build-support/release/changelog b/build-support/release/changelog
new file mode 100755
index 0000000..6bd8ee9
--- /dev/null
+++ b/build-support/release/changelog
@@ -0,0 +1,152 @@
+#!/usr/bin/env ruby
+#
+# Copyright 2014 Apache Software Foundation
+#
+# Licensed 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.
+#
+# Updates the CHANGELOG for the specified Apache Aurora release, if no
+# version override is specified then .auroraversion will be read and used.
+# The version string will need to match the Apache Aurora jira tickets
+# fixVersion to generate this list.
+#
+require 'rubygems'
+require 'json'
+require 'uri'
+require 'net/http'
+require 'net/https'
+require 'openssl'
+require 'tempfile'
+
+def http_post(uri, params={}, headers={}, body=nil, debug=false)
+  http = Net::HTTP.new(uri.host, uri.port)
+  http.set_debug_output($stdout) if debug
+  if uri.scheme == "https" || uri.port == 443
+    http.use_ssl = true
+    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+  end
+  response = nil
+
+  begin
+    request = Net::HTTP::Post.new(uri.request_uri)
+    request.set_form_data(params) if (params && params.size > 1)
+    request.basic_auth uri.user, uri.password if uri.user
+    request.body = body if body
+
+    headers.each_pair do |name, value|
+      request[name] = value
+    end
+
+    response = http.request(request)
+  rescue Exception => e
+    raise "Error posting to #{uri.to_s}. #{e}"
+  end
+
+  response
+end
+
+def get_jira_issues_for_query(url, jql, startAt=0, maxResults=100)
+  begin
+    request_body = { :jql => jql, :startAt => startAt, :maxResults => maxResults}
+    response = http_post(
+      URI(url),
+      {},
+      {"content-type" => 'application/json', "accept" => "application/json"},
+      request_body.to_json
+    )
+  rescue StandardError => e
+    raise "Error executing jql query: #{jql}. #{e}"
+  end
+
+  begin
+    results = JSON.parse(response.body)
+  rescue StandardError => e
+    raise "Error parsing json result"
+  end
+
+  results
+end
+
+def get_all_jira_issues_for_query(url, jql)
+  startAt = 0
+  maxResults = 100
+
+  results = []
+  begin
+    res = get_jira_issues_for_query(url, jql, startAt, maxResults)
+    results.concat(res['issues']) if res && res.has_key?('issues')
+    startAt = startAt + maxResults
+  end until (results.size() == res['total'] )
+
+  results
+end
+
+base_dir = `git rev-parse --show-toplevel`.strip
+
+# Get the current version from the .auroraversion file if no version override is provided
+version = nil
+if ARGV[0].nil?
+  version = nil
+  Dir.chdir(base_dir) do
+    version = File.read('.auroraversion').strip
+  end
+else
+  version = ARGV[0]
+end
+
+raise "Unable to read .auroraversion" if version.nil?
+
+jira_base_url = "https://issues.apache.org/jira"
+jira_search_url = "/rest/api/2/search"
+jira_url = jira_base_url + jira_search_url
+
+jql="project=AURORA AND fixVersion='#{version}' AND status in (Resolved,Closed) ORDER BY
issuetype"
+
+# Fetch all the issues available for the given jql query
+results = get_all_jira_issues_for_query(jira_url, jql)
+
+changelog = {}
+# Loop through and add all results
+results.each do |issue|
+  key = issue['key']
+  summary = issue['fields']['summary']
+  type = issue['fields']['issuetype']['name']
+
+  changelog_entry = "[#{key}] - #{summary}"
+
+  if !changelog[type].nil?
+    changelog[type] << changelog_entry
+  else
+    changelog[type] = [changelog_entry]
+  end
+end
+
+# Merge the new updates and the existing changelog
+tmpfile = Tempfile.open('aurora.changelog')
+begin
+  tmpfile.puts "Aurora #{version}", "-" * 80
+  changelog.keys.sort.each do |type|
+    tmpfile.puts "## #{type}"
+    changelog[type].each { |entry| tmpfile.puts "    * #{entry}" }
+    tmpfile.puts ""
+  end
+  # Append all the existing CHANGELOG entries and write the new CHANGELOG file
+  tmpfile.puts ""
+  changelog_file = File.join(base_dir, 'CHANGELOG')
+  tmpfile.write File.read(changelog_file) if File.exist?(changelog_file)
+  tmpfile.rewind
+  tmpfile.flush
+  File.open(changelog_file,"w+") {|f|  f.write(tmpfile.read) }
+ensure
+  tmpfile.close
+  tmpfile.unlink
+end

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/build-support/release/release
----------------------------------------------------------------------
diff --git a/build-support/release/release b/build-support/release/release
new file mode 100755
index 0000000..eefd2cb
--- /dev/null
+++ b/build-support/release/release
@@ -0,0 +1,251 @@
+#!/bin/bash
+#
+# Copyright 2014 Apache Software Foundation
+#
+# Licensed 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.
+#
+#
+# This script is used to publish the official release after a successful
+# vote of a release-candidate.
+
+set -e
+set -o nounset
+
+aurora_git_url='https://git-wip-us.apache.org/repos/asf/incubator-aurora.git'
+aurora_git_web_url='https://git-wip-us.apache.org/repos/asf?p=incubator-aurora.git'
+aurora_svn_dist_url='https://dist.apache.org/repos/dist/release/incubator/aurora'
+aurora_svn_dev_dist_url='https://dist.apache.org/repos/dist/dev/incubator/aurora'
+
+function print_help_and_exit {
+cat <<EOF
+Apache Aurora release tool.
+
+Usage: $0 [-h] [-r #] [-p | publish]
+
+  -h   Print this help message and exit
+  -r   Release candidate number (default: 0)
+  -p   Publish (default: dry-run (does not publish anything))
+EOF
+exit 0
+}
+
+publish=0
+rc_tag_version=0
+while getopts ":hl:r:p" opt; do
+  case $opt in
+    r)
+      rc_tag_version=${OPTARG}
+      ;;
+    p)
+      publish=1
+      ;;
+    h)
+      print_help_and_exit
+      ;;
+    *  )
+      echo "Unknown option: -$OPTARG"
+      print_help_and_exit
+      ;;
+  esac
+done
+
+shift $(($OPTIND - 1))
+if [[ "${1:-dry-run}" == "publish" ]]; then
+  publish=1
+fi
+
+# Update local repository
+git fetch --all -q
+git fetch --tags -q
+
+# Ensure that a signing key is available
+if [[ -z "`git config user.signingkey`" ]]; then
+  cat <<EOF
+Error: No GPG signing key can be found within gitconfig.
+
+To configure one, find your code signing key's ID with
+
+   gpg --list-secret-keys
+
+Then configure it as the signing key for this repository with
+
+   git config user.signingkey YOUR_KEY_ID
+EOF
+  exit 1
+fi
+
+# Set the base dir for the script to be the top level of the repository
+base_dir=$(git rev-parse --show-toplevel)
+# Verify that this is a clean repository
+if [[ -n "`git status --porcelain`" ]]; then
+  echo "ERROR: Please run from a clean master."
+  exit 1
+elif [[ "`git rev-parse --abbrev-ref HEAD`" == "master" ]]; then
+  echo "ERROR: This script must be run from the released branch."
+  exit 1
+fi
+
+if [[ "$base_dir" != "$PWD" ]]; then
+  echo "Warrning: This script must be run from the root of the repository ${base_dir}"
+  cd $base_dir
+fi
+
+# Make sure that this is not on a snapshot release
+tagged_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
+current_version=$tagged_version
+if [[ $current_version =~ .*-SNAPSHOT ]]; then
+  echo "ERROR: .auroraversion can not be a 'SNAPSHOT', it is ${current_version}"
+  exit 1
+else
+  major=`echo $current_version | cut -d. -f1`
+  minor=`echo $current_version | cut -d. -f2`
+  patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`
+
+  current_version="${major}.${minor}.${patch}"
+fi
+
+# Make sure the tag does not exist
+if git rev-parse --tags=$current_version >/dev/null 2>&1; then
+  echo "ERROR: ${current_version} tag exists."
+  exit 1
+fi
+
+# All check are now complete, before we start alert if we are in dry-run
+if [[ $publish == 0 ]]; then
+  echo "Performing dry-run"
+fi
+
+# Create a branch for the release and update the .auroraversion and tag it
+echo "Creating release branch and tag for ${current_version}"
+git checkout -b $current_version
+echo $current_version_tag > .auroraversion
+git add .auroraversion
+git commit -m "Updating .auroraversion to ${current_version}."
+
+git tag -s "${current_version}" -m "aurora-${current_version} release." $current_version
+
+if [[ $publish == 1 ]]; then
+  git push origin $current_version
+  git push origin --tags
+fi
+
+dist_name="aurora-${current_version}-incubating"
+
+dist_dir=${base_dir}/dist
+release_dir=${dist_dir}/${current_version}
+mkdir -p $release_dir
+cd $dist_dir
+
+if [[ $publish == 1 ]]; then
+  echo "Publishing the release"
+  # Make and checkout the release dist directory
+  svn mkdir ${aurora_svn_dist_url}/${current_version} -m "aurora-${current_version} release"
+  svn co --depth=empty ${aurora_svn_dist_url}/${current_version} ${release_dir}
+fi
+
+# Now that the .auroraversion has been updated to the release version build the release source
dist from it
+cd $base_dir
+git archive --prefix=${dist_name}/ -o ${release_dir}/${dist_name}.tar.gz HEAD
+
+cd ${release_dir}
+# Sign the tarball.
+echo "Signing the distribution"
+gpg --armor --output ${release_dir}/${dist_name}.tar.gz.asc --detach-sig ${release_dir}/${dist_name}.tar.gz
+
+# Create the checksums
+echo "Creating checksums"
+# md5
+gpg --print-md MD5 ${dist_name}.tar.gz > ${dist_name}.tar.gz.md5
+gpg --print-md MD5 ${dist_name}.tar.gz.asc > ${dist_name}.tar.gz.asc.md5
+# sha
+shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha
+shasum ${dist_name}.tar.gz.asc > ${dist_name}.tar.gz.asc.sha
+
+if [[ $publish == 1 ]]; then
+  # Commit the release
+  svn add aurora-*
+  svn ci -m "aurora-${current_version} release"
+
+  # Finally delete all release candidate branches
+  for ref in $(git for-each-ref --format='%(refname:short)' 'refs/heads/${current_version}-rc*')
do
+    git branch -D ${ref}
+    git push origin --delete ${ref}
+    svn rm ${aurora_svn_dev_dist_url}/${ref}
+  done
+fi
+
+cd ${base_dir}
+
+echo "Done creating the release. The following draft email has been created"
+echo "to send to the dev@aurora.incubator.apache.org mailing list."
+echo
+
+# Create the email template for the release to be sent to the mailing lists.
+MESSAGE=$(cat <<__EOF__
+To: dev@aurora.incubator.apache.org
+Subject: [RESULT][VOTE] Release Apache Aurora ${current_version} (incubating) RC#{rc_tag_version}
+
+All,
+The vote to accept Apache Aurora ${current_version} RC#{rc_tag_version}
+as the official Apache Aurora ${current_version} release has passed.
+
+
++1 (Binding)
+------------------------------
+
+
++1 (Non-binding)
+------------------------------
+
+
+There were no 0 or -1 votes. Thank you to all who helped make this release.
+
+
+Aurora ${current_version} includes the following:
+---
+The CHANGELOG for the release is available at:
+${aurora_git_web_url};a=blob_plain;f=CHANGELOG;hb=${current_version}
+
+The tag used to create the release with is ${current_version}:
+${aurora_git_web_url};a=commit;h=${current_version}
+
+The release is available at:
+${aurora_svn_dist_url}/${current_version}/${dist_name}.tar.gz
+
+The MD5 checksum of the release can be found at:
+${aurora_svn_dist_url}/${current_version}/${dist_name}.tar.gz.md5
+
+The signature of the release can be found at:
+${aurora_svn_dist_url}/${current_version}/${dist_name}.tar.gz.asc
+
+The GPG key used to sign the release are available at:
+${aurora_svn_dist_url}/KEYS
+
+__EOF__
+)
+echo "--------------------------------------------------------------------------------"
+echo
+echo "${MESSAGE}"
+echo
+echo "--------------------------------------------------------------------------------"
+echo
+
+# Print reset instructions if this was a dry-run
+if [[ $publish == 0 ]]; then
+  echo
+  echo "This is a dry run, nothing has been published."
+  echo
+  echo "To clean up run: rm -rf ${dist_dir}"
+fi
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/build-support/release/release-candidate
----------------------------------------------------------------------
diff --git a/build-support/release/release-candidate b/build-support/release/release-candidate
new file mode 100755
index 0000000..2a86413
--- /dev/null
+++ b/build-support/release/release-candidate
@@ -0,0 +1,291 @@
+#!/bin/bash
+#
+# Copyright 2014 Apache Software Foundation
+#
+# Licensed 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.
+#
+#
+# This script is used to create a release candidate. It will update the current
+# .auroraversion as well as creates a branch for the new release candidate and
+# publishes the source distrobution and signatures to be voted on.
+#
+#   master~1 (0.5.0-snapshot) ----- master (0.6.0-snapshot)
+#                             \---- 0.5.0 (0.5.0)
+#
+# A email template will be generated after successfully generating a release
+# candidate which will need to be sent to the dev@ and private@ mailing lists.
+#
+set -o errexit
+set -o nounset
+
+rc_tag_version=0
+aurora_git_url='https://git-wip-us.apache.org/repos/asf/incubator-aurora.git'
+aurora_git_web_url='https://git-wip-us.apache.org/repos/asf?p=incubator-aurora.git'
+aurora_svn_dist_url='https://dist.apache.org/repos/dist/dev/incubator/aurora'
+
+function print_help_and_exit {
+cat <<EOF
+Apache Aurora release candidate tool.
+
+Usage: $0 [-h] [-l p|m|M] [-r #] [-p | publish]
+
+  -h   Print this help message and exit
+  -l   Increment level, must be one of:
+         p, patch (default)
+         m, minor
+         M, major
+  -r   Release candidate number (default: 0)
+  -p   Publish the release candidate (default: dry-run, does not publish anything)
+EOF
+exit 0
+}
+
+publish=0
+increment_level="patch"
+rc_tag_version=0
+while getopts ":hl:r:p" opt; do
+  case $opt in
+    l)
+      case ${OPTARG} in
+        'p' | 'patch') increment_level='patch' ;;
+        'm' | 'minor') increment_level='minor' ;;
+        'M' | 'major') increment_level='major' ;;
+         *) echo 'Unknown increment level'; exit 1 ;;
+      esac
+      ;;
+    r)
+      rc_tag_version=${OPTARG}
+      ;;
+    p)
+      publish=1
+      ;;
+    h)
+      print_help_and_exit
+      ;;
+    *  )
+      echo "Unknown option: -$OPTARG"
+      print_help_and_exit
+      ;;
+  esac
+done
+
+shift $(($OPTIND - 1))
+if [[ "${1:-dry-run}" == "publish" ]]; then
+  publish=1
+fi
+
+# Update local repository
+git fetch --all -q
+git fetch --tags -q
+
+# Set the base dir for the script to be the top level of the repository
+base_dir=$(git rev-parse --show-toplevel)
+
+# Verify that this is a clean repository
+if [[ -n "`git status --porcelain`" ]]; then
+  echo "ERROR: Please run from a clean git repository."
+  exit 1
+elif [[ "`git rev-parse --abbrev-ref HEAD`" != "master" ]]; then
+  echo "ERROR: This script must be run from master."
+  exit 1
+fi
+
+if [[ "$base_dir" != "$PWD" ]]; then
+  echo "Warning: This script must be run from the root of the repository ${base_dir}"
+  cd $base_dir
+fi
+
+# Calculate the new version string
+current_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
+if ! [[ $current_version =~ .*-SNAPSHOT ]]; then
+  echo "ERROR: .auroraversion is required to contain 'SNAPSHOT', it is ${current_version}"
+  exit 1
+else
+  major=`echo $current_version | cut -d. -f1`
+  minor=`echo $current_version | cut -d. -f2`
+  patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`
+
+  current_version="${major}.${minor}.${patch}"
+
+  if [[ $increment_level == "patch" ]]; then
+    new_master_version="${major}.${minor}.$((patch + 1))"
+  elif [[ $increment_level == "minor" ]]; then
+    new_master_version="${major}.$((minor + 1)).0"
+  elif [[ $increment_level == "major" ]]; then
+    new_master_version="$((major + 1)).0.0"
+  else
+    new_master_version=$current_version
+  fi
+
+  new_snapshot_version="${new_master_version}-SNAPSHOT"
+fi
+
+# Add the rc tag to the current version
+current_version_tag="${current_version}-rc${rc_tag_version}"
+
+# Make sure the branch does not exist
+if git rev-parse $current_version_tag >/dev/null 2>&1; then
+  echo "ERROR: ${current_version_tag} exists."
+  exit 1
+fi
+
+# Reset instructions
+current_git_rev=$(git rev-parse HEAD)
+function print_reset_instructions {
+cat <<EOF
+To roll back your local repo you will need to run:
+
+  git checkout master
+  git reset --hard ${current_git_rev}
+  git branch -D ${current_version_tag}
+EOF
+}
+
+# If anything goes wrong from here then print roll back instructions before exiting.
+function print_rollback_instructions {
+  echo "ERROR: Looks like something has failed while creating the release candidate."
+  print_reset_instructions
+}
+trap print_rollback_instructions EXIT
+
+# All check are now complete, before we start alert if we are in dry-run
+if [[ $publish == 0 ]]; then
+  echo "Performing dry-run"
+fi
+
+# This should be a clean repo we are working against. Run clean just to ensure it is.
+git clean -fdxq
+
+echo "Generating changelog"
+${base_dir}/build-support/release/changelog $current_version
+git add CHANGELOG
+git commit -m "Updating CHANGELOG for ${current_version} release."
+
+echo "Creating ${current_version_tag} branch"
+git branch $current_version_tag $(git rev-parse HEAD)
+
+echo "Committing updated .auroraversion on master"
+echo $new_snapshot_version > .auroraversion
+git add .auroraversion
+git commit -m "Incrementing snapshot version to ${new_snapshot_version}."
+
+# Build the source distribution from the new branch
+echo "Checking out ${current_version_tag} branch and updating .auroraversion"
+git checkout $current_version_tag
+# Increment the version and create a branch
+echo $current_version_tag > .auroraversion
+git add .auroraversion
+git commit -m "Updating .auroraversion to ${current_version_tag}."
+
+echo "Building the source distribution"
+dist_dir=${base_dir}/dist
+dist_name="aurora-${current_version_tag}-incubating"
+
+mkdir -p ${dist_dir}
+git archive --prefix=${dist_name}/ -o ${dist_dir}/${dist_name}.tar.gz HEAD
+
+cd ${dist_dir}
+# Sign the tarball.
+echo "Signing the distribution"
+gpg --armor --output ${dist_dir}/${dist_name}.tar.gz.asc --detach-sig ${dist_dir}/${dist_name}.tar.gz
+
+# Create the checksums
+echo "Creating checksums"
+# md5
+gpg --print-md MD5 ${dist_name}.tar.gz > ${dist_name}.tar.gz.md5
+gpg --print-md MD5 ${dist_name}.tar.gz.asc > ${dist_name}.tar.gz.asc.md5
+# sha
+shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha
+shasum ${dist_name}.tar.gz.asc > ${dist_name}.tar.gz.asc.sha
+
+# Publish release candidate to svn and commit and push the new git branch
+if [[ $publish == 1 ]]; then
+  echo "Publishing release candidate to ${aurora_svn_dist_url}/${current_version_tag}"
+  svn mkdir ${aurora_svn_dist_url}/${current_version_tag} -m "aurora-${current_version} release
candidate ${rc_tag_version}"
+  svn co --depth=empty ${aurora_svn_dist_url}/${current_version_tag} ${dist_dir}
+  svn add aurora-*
+  svn ci -m "aurora-${current_version} release candidate ${rc_tag_version}"
+
+  echo "Pushing new branch ${current_version_tag} to origin"
+  cd ${base_dir}
+  git push origin ${current_version_tag}
+  echo "Pushing updated .auroraversion to master"
+  git checkout master
+  git push origin master
+fi
+
+cd ${base_dir}
+
+echo "Done creating the release candidate. The following draft email has been created"
+echo "to send to the dev@aurora.incubator.apache.org mailing list"
+echo
+
+# Create the email template for the release candidate to be sent to the mailing lists.
+MESSAGE=$(cat <<__EOF__
+To: dev@aurora.incubator.apache.org
+Subject: [VOTE] Release Apache Aurora ${current_version} (incubating) RC${rc_tag_version}
+
+All,
+I propose that we accept the following release candidate as the official
+Apache Aurora ${current_version} release.
+
+
+Aurora ${current_version_tag} includes the following:
+---
+The CHANGELOG for the release is available at:
+${aurora_git_web_url};a=blob_plain;f=CHANGELOG;hb=${current_version_tag}
+
+The branch used to create the release with is ${current_version_tag}:
+${aurora_git_web_url};a=tree;hb=${current_version_tag}
+
+The release candidate is available at:
+${aurora_svn_dist_url}/${current_version_tag}/${dist_name}.tar.gz
+
+The MD5 checksum of the release candidate can be found at:
+${aurora_svn_dist_url}/${current_version_tag}/${dist_name}.tar.gz.md5
+
+The signature of the release candidate can be found at:
+${aurora_svn_dist_url}/${current_version_tag}/${dist_name}.tar.gz.asc
+
+The GPG key used to sign the release are available at:
+${aurora_svn_dist_url}/KEYS
+
+Please download, verify, and test.
+
+The vote will close on `date -v+3d`
+
+[ ] +1 Release this as Apache Aurora ${current_version}
+[ ] +0
+[ ] -1 Do not release this as Apache Aurora ${current_version} becuase...
+
+__EOF__
+)
+
+echo "--------------------------------------------------------------------------------"
+echo
+echo "${MESSAGE}"
+echo
+echo "--------------------------------------------------------------------------------"
+echo
+
+# Print reset instructions if this was a dry-run
+if [[ $publish == 0 ]]; then
+  echo
+  echo "This was a dry run, nothing has been published."
+  echo
+  print_reset_instructions
+fi
+
+# Unset error message handler and exit
+trap '' EXIT
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/build-support/release/tag-release
----------------------------------------------------------------------
diff --git a/build-support/release/tag-release b/build-support/release/tag-release
deleted file mode 100755
index abfe505..0000000
--- a/build-support/release/tag-release
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/bin/bash
-# Cuts a release tag (non -snapshot) from the current master and prints instructions for
publishing
-# it. The generated tag object is PGP-signed. Given a current master on 0.3.0-snapshot it
will
-# create a git history that looks like this:
-# master~1 (0.3.0-snapshot) ----- master (0.4.0-snapshot)
-#                            \--- release-0.4.0 (0.4.0) tag: 0.4.0 (0.4.0)
-set -o errexit
-set -o nounset
-
-if [[ -n "`git status --porcelain`" ]]; then
-  echo "!! Please run from a clean master."
-  exit 1
-elif [[ "`git rev-parse --abbrev-ref HEAD`" != master ]]; then
-  echo "!! This script must be run from master."
-  exit 1
-elif [[ "`git rev-parse --show-toplevel`" != "$PWD" ]]; then
-  echo "!! This script must be run from the root of the repository."
-  exit 1
-elif [[ -z "`git config user.signingkey`" ]]; then
-  cat <<EOF
-!! No GPG signing key is configured for this repository.
-
-To configure one, find your code signing key's ID with
-
-   gpg --list-secret-keys
-
-Then configure it as the signing key for this repository with
-
-   git config user.signingkey YOUR_KEY_ID
-EOF
-  exit 1
-fi
-
-function print_help_and_exit {
-cat <<EOF
-Aurora release tagging tool.
-
-Usage: $0 [-h] [-d|-p|-m|-M]
-
-  -h   Print this help message and exit
-  -d   Create a new development tag (default)
-  -p   Perform patch-level release
-  -m   Perform minor-level release
-  -M   Perform major-level release
-EOF
-exit 0
-}
-
-increment_level="dev"
-while getopts ":phm" opt; do
-  case $opt in
-    d)
-      increment_level="dev"
-      ;;
-    p)
-      increment_level="patch"
-      ;;
-    m)
-      increment_level="minor"
-      ;;
-    M)
-      increment_level="major"
-      ;;
-    h)
-      print_help_and_exit
-      ;;
-  esac
-done
-
-echo == Updating to latest master.
-git pull
-git fetch --tags
-
-current_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
-if ! [[ $current_version =~ .*-SNAPSHOT ]]; then
-  echo "!! This is not a SNAPSHOT branch (.auroraversion is $current_version)."
-  exit 1
-else
-  major=`echo $current_version | cut -d. -f1`
-  minor=`echo $current_version | cut -d. -f2`
-  patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`
-
-  new_tagged_version="$major.$minor.$patch"
-
-  if [[ $increment_level == "dev" ]]; then
-    new_tagged_version="$major.$minor.$patch-dev$(date +%s)"
-    new_snapshot_version="$major.$minor.$patch-SNAPSHOT"
-    release_branch_name="devel-$new_tagged_version"
-  elif [[ $increment_level == "patch" ]]; then
-    new_snapshot_version="$major.$minor.$((patch + 1))-SNAPSHOT"
-    release_branch_name="release-$major.$minor.$((patch + 1))"
-  elif [[ $increment_level == "minor" ]]; then
-    new_snapshot_version="$major.$((minor + 1)).0-SNAPSHOT"
-    release_branch_name="release-$major.$((minor + 1)).0"
-  elif [[ $increment_level == "major" ]]; then
-    new_snapshot_version="$((major + 1)).0.0-SNAPSHOT"
-    release_branch_name="release-$major.0.0"
-  else
-    echo "Unknown release increment $increment_level"
-    exit 1
-  fi
-fi
-
-if git rev-parse $new_tagged_version >/dev/null 2>&1; then
-  echo "Tag $new_tagged_version already exists, aborting."
-  exit 1
-fi
-
-current_rev=`git rev-parse HEAD`
-function print_rollback_instructions {
-cat <<EOF
-!! Looks like something failed. That's okay, the world doesn't need to know.
-
-To roll back your local repo you might need to run:
-  git checkout master
-  git reset --hard $current_rev
-  git tag -d $new_tagged_version
-  git branch -D $release_branch_name
-EOF
-}
-trap print_rollback_instructions EXIT
-
-function increment_aurora_version {
-  if [[ $new_snapshot_version != $current_version ]]; then
-    echo == Incrementing snapshot version on master.
-    echo $new_snapshot_version > .auroraversion
-    git add .auroraversion
-    git commit -m "Incrementing snapshot version from $current_version to $new_snapshot_version."
-  fi
-
-  echo == Creating $release_branch_name branch.
-  git checkout -b $release_branch_name $current_rev
-
-  echo == Committing updated .auroraversion.
-  echo $new_tagged_version > .auroraversion
-  git add .auroraversion
-  git commit -m "aurora-$new_tagged_version release."
-}
-
-increment_aurora_version
-
-echo == Creating tag $new_tagged_version.
-git tag -s -m "aurora-$new_tagged_version." $new_tagged_version
-
-cat <<EOF
-== Tag created.
-
-After you've verified that everything looks good, publish the new tag by running:
-   git checkout master
-   git push origin master
-   git push origin $new_tagged_version
-EOF
-trap '' EXIT # Unset error message handler.
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/build-support/release/verify-release-candidate
----------------------------------------------------------------------
diff --git a/build-support/release/verify-release-candidate b/build-support/release/verify-release-candidate
new file mode 100755
index 0000000..6aaed5d
--- /dev/null
+++ b/build-support/release/verify-release-candidate
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# Copyright 2014 Apache Software Foundation
+#
+# Licensed 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.
+#
+#
+# This script will download a release candidate and verify the gpg signature and
+# checksums.
+#
+set -e
+
+aurora_svn_dev_dist_url='https://dist.apache.org/repos/dist/dev/incubator/aurora'
+
+# Get the current version string
+if [[ ! -f .auroraversion ]]; then
+  read -r -p "Apache Aurora version to verify: " current_version
+else
+  current_version=$(cat .auroraversion | tr '[a-z]' '[A-Z]')
+fi
+
+dist_name="aurora-${current_version}-incubating"
+rc_dir=${dist_name}-verify
+mkdir -p $rc_dir
+cd $rc_dir
+
+# Download KEYS file
+curl -O ${aurora_svn_dev_dist_url}/KEYS
+
+# Check and import the KEYS files
+read -r -p "Import Apache Aurora GPG KEYS? [y/n]" response
+response=${response,,}
+if [[ $response =~ ^(yes|y| ) ]]; then
+  gpg --import KEYS
+fi
+
+# Check out the rc
+svn co ${aurora_svn_dev_dist_url}/${current_version} ${rc_dir}
+
+# Verify GPG
+gpg --verify ${dist_name}.tar.gz.asc ${dist_name}.tar.gz
+
+# Verify MD5
+gpg --print-md MD5 ${dist_name}.tar.gz | diff - ${dist_name}.tar.gz.md5
+
+# Verify SHA
+shasum ${dist_name}.tar.gz | diff - ${dist_name}.tar.gz.sha
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/docs/committers.md
----------------------------------------------------------------------
diff --git a/docs/committers.md b/docs/committers.md
new file mode 100644
index 0000000..3f68f89
--- /dev/null
+++ b/docs/committers.md
@@ -0,0 +1,49 @@
+Setting up your email account
+-----------------------------
+Once your Apache ID has been set up you can configure your account and add ssh keys and setup
an
+email forwarding address at
+
+  http://id.apache.org
+
+Additional instructions for setting up your new committer email can be found at
+
+  http://www.apache.org/dev/user-email.html
+
+The recommended setup is to configure all services (mailing lists, JIRA, ReviewBoard) to
send
+emails to your @apache.org email address.
+
+
+Creating a release
+------------------
+The following will guide you through the steps to create a release candidate, vote, and finally
an
+official Apache Aurora release. Before starting your gpg key should be in the KEYS file and
you
+must have access to commit to the dist.a.o repositories.
+
+1. Ensure that all issues resolved for this release candidate are tagged with the correct
Fix
+Version in Jira, the changelog script will use this to generate the CHANGELOG in step #2.
+
+2. Create a release candidate. This will automatically update the CHANGELOG and commit it,
create a
+branch and update the current version within the trunk. To create a minor version update
and publish
+it run
+
+               ./build-support/release/release-candidate -l m -p
+
+3. Update, if necessary, the draft email created from the `release-candidate` script in step
#2 and
+send the [VOTE] email to the dev@ and private@ mailing lists. You can verify the release
signature
+and checksums by running
+
+				./build-support/release/verify-release-candidate
+
+4. Wait for the vote to complete. If the vote fails address any issues and go back to step
#1 and
+run again, this time you will use the -r flag to increment the release candidate version.
This will
+automatically clean up the release candidate rc0 branch and source distribution.
+
+               ./build-support/release/release-candidate -l m -r 1 -p
+
+5. Once the vote has successfully passed create the release
+
+               ./build-support/release/release
+
+6. Update the draft email created fom the `release` script in step #5 to include the Apache
ID's for
+all binding votes and send the [RESULT][VOTE] email to the dev@ and private@ mailing lists.
+

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/953bf836/docs/contributing.md
----------------------------------------------------------------------
diff --git a/docs/contributing.md b/docs/contributing.md
index 4341163..d337da2 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -2,20 +2,6 @@ Getting your ReviewBoard Account
 --------------------------------
 Go to https://reviews.apache.org and create an account.
 
-Setting up your email account (committers)
-------------------------------------------
-Once your Apache ID has been set up you can configure your account and add ssh keys and
-setup an email forwarding address at
-
-  http://id.apache.org
-
-Additional instructions for setting up your new committer email can be found at
-
-  http://www.apache.org/dev/user-email.html
-
-The recommended setup is to configure all services (mailing lists, JIRA, ReviewBoard) to
-send emails to your @apache.org email address.
-
 Setting up your ReviewBoard Environment
 ---------------------------------------
 Run `./rbt status`. The first time this runs it will bootstrap and you will be asked to login.


Mime
View raw message