Repository: aurora-packaging Updated Branches: refs/heads/master b09eb9ff1 -> 73dc77c53
Introduce a helper script for preparing RCs. This is a bit piecemeal at the moment, but automates preparation of RC artifacts created with `./build-artifact` for upload to bintray. Basic docs are provided for preparing an RC, but more glue scripting is still needed to make the process as smooth and automated as the main aurora release. Reviewed at https://reviews.apache.org/r/44530/ Project: http://git-wip-us.apache.org/repos/asf/aurora-packaging/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora-packaging/commit/73dc77c5 Tree: http://git-wip-us.apache.org/repos/asf/aurora-packaging/tree/73dc77c5 Diff: http://git-wip-us.apache.org/repos/asf/aurora-packaging/diff/73dc77c5 Branch: refs/heads/master Commit: 73dc77c53293a49c3db266863f67d93caa96786c Parents: b09eb9f Author: John Sirois <[email protected]> Authored: Tue Mar 8 14:47:13 2016 -0700 Committer: John Sirois <[email protected]> Committed: Wed Mar 9 10:35:44 2016 -0700 ---------------------------------------------------------------------- README.md | 37 ++++++++++++++++ build-support/release/release-candidate | 64 +++++++++++++++++++++++++++ docs/images/bintray-publish.png | Bin 0 -> 204309 bytes docs/images/bintray-upload.png | Bin 0 -> 145853 bytes 4 files changed, 101 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/73dc77c5/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index a31f66c..3a7cf45 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,43 @@ from the Aurora source repository: When this completes, debs will be placed in `dist/builder/deb/ubuntu-trusty/`. +### Creating a release candidate + +Release candidates are hashed and signed binaries that are uploaded to bintray for +easy access and testing by voters. You will need to have a [bintray](https://bintray.com/) +account and a generic repo created for the purpose of uploading the release candidate binaries +in order to proceed. + +#### Cut a branch and build the binaries + +The example below is for the 0.12.0 release where upstream is https://git-wip-us.apache.org/repos/asf/aurora-packaging: + + git checkout -b 0.12.x upstream/master + +Now run the [Building a binary](#building-a-binary) procedure detailed above. + +#### Hash, sign and upload the binaries + +Run the following which will create a tarball for each distribution platform that can be uploaded to bintray: + + ./build-support/release/release-candidate + Signing artifacts for centos-7... + Created archive for centos-7 artifacts at /home/jsirois/dev/aurora/jsirois-aurora-packaging/artifacts/aurora-centos-7/dist/rpmbuild/RPMS/upload.tar. + Signing artifacts for debian-jessie... + Created archive for debian-jessie artifacts at /home/jsirois/dev/aurora/jsirois-aurora-packaging/artifacts/aurora-debian-jessie/upload.tar. + Signing artifacts for ubuntu-trusty... + Created archive for ubuntu-trusty artifacts at /home/jsirois/dev/aurora/jsirois-aurora-packaging/artifacts/aurora-ubuntu-trusty/upload.tar. + All artifacts prepared for upload to bintray. + +In the bintray UI, create a new version in your release-candidate repo, for example '0.12.0'. Then, in the version UI you can +upload the tarballs, ensuring you select 'Explode this archive'. + + + +Finally, 'publish' the results. + + + ### Adding a new distribution platform There are only two requirements for a 'builder' to satisfy: http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/73dc77c5/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..c21a010 --- /dev/null +++ b/build-support/release/release-candidate @@ -0,0 +1,64 @@ +#!/bin/bash + +# This script should be run after using `./build-artifact` to create rpms +# and debs. It will checksum and sign the artifacts and produce tarballs +# suitable for upload and explosion in a bintray repository. + +set -o errexit +set -o nounset +set -o pipefail + +ROOT_DIR=$(git rev-parse --show-toplevel) +cd "${ROOT_DIR}" + +declare -A DIST_DIRS=( + ["ubuntu-trusty"]="${ROOT_DIR}/artifacts/aurora-ubuntu-trusty/dist" + ["debian-jessie"]="${ROOT_DIR}/artifacts/aurora-debian-jessie/dist" + ["centos-7"]="${ROOT_DIR}/artifacts/aurora-centos-7/dist/rpmbuild/RPMS/x86_64" +) + +function oses() { + echo "${!DIST_DIRS[@]}" +} + +function dist_dir() { + local os="$1" + echo "${DIST_DIRS["${os}"]}" +} + +function sign_artifacts() { + local os="$1" + local dist_dir="$(dist_dir ${os})" + + find "${dist_dir}" -maxdepth 1 -type f | while read file; do + # Sign the tarball. + gpg --armor --output ${file}.asc --detach-sig ${file} + + # Create the checksums + gpg --print-md MD5 ${file} > ${file}.md5 + shasum ${file} > ${file}.sha + done +} + +function zip_artifacts() { + local os="$1" + local dist_dir="$(dist_dir ${os})" + + local stage_dir="${dist_dir}/.stage" + rm -rf "${stage_dir}" && mkdir -p "${stage_dir}/${os}" + find "${dist_dir}" -maxdepth 1 -type f | while read file; do + ln -s ${file} "${stage_dir}/${os}/$(basename ${file})" + done + + local tarball="$(dirname ${dist_dir})/upload.tar" + tar -chf "${tarball}" -C "${stage_dir}" "${os}" + echo "${tarball}" +} + +for os in $(oses); do + echo "Signing artifacts for ${os}..." + sign_artifacts "${os}" + archive="$(zip_artifacts "${os}")" + echo "Created archive for ${os} artifacts at ${archive}." +done +echo "All artifacts prepared for upload to bintray." http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/73dc77c5/docs/images/bintray-publish.png ---------------------------------------------------------------------- diff --git a/docs/images/bintray-publish.png b/docs/images/bintray-publish.png new file mode 100644 index 0000000..9a4b67a Binary files /dev/null and b/docs/images/bintray-publish.png differ http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/73dc77c5/docs/images/bintray-upload.png ---------------------------------------------------------------------- diff --git a/docs/images/bintray-upload.png b/docs/images/bintray-upload.png new file mode 100644 index 0000000..5fd9296 Binary files /dev/null and b/docs/images/bintray-upload.png differ
