From d0a4b216a68d0ea27b4604330ed779fa5ed96c35 Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Sun, 19 Jul 2015 12:43:28 -0700 Subject: [PATCH] update release script and release process Signed-off-by: Jessica Frazelle Signed-off-by: Jessica Frazelle --- Dockerfile | 6 --- hack/make.sh | 1 - hack/release.sh | 92 ------------------------------------ project/RELEASE-CHECKLIST.md | 81 +++++++++++++++++++------------ 4 files changed, 51 insertions(+), 129 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2584d771e..c30a11b01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,9 +53,6 @@ RUN apt-get update && apt-get install -y \ python-mock \ python-pip \ python-websocket \ - reprepro \ - ruby1.9.1 \ - ruby1.9.1-dev \ s3cmd=1.1.0* \ ubuntu-zfs \ libzfs-dev \ @@ -116,9 +113,6 @@ RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ && go install -v github.com/golang/lint/golint -# TODO replace FPM with some very minimal debhelper stuff -RUN gem install --no-rdoc --no-ri fpm --version 1.3.2 - # Install registry ENV REGISTRY_COMMIT ec87e9b6971d831f0eff752ddb54fb64693e51cd RUN set -x \ diff --git a/hack/make.sh b/hack/make.sh index c7318953b..628ce6d29 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -63,7 +63,6 @@ DEFAULT_BUNDLES=( cover cross tgz - ubuntu ) VERSION=$(< ./VERSION) diff --git a/hack/release.sh b/hack/release.sh index bdeabc8fe..7b2ae7e89 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -22,16 +22,12 @@ To run, I need: environment variables AWS_S3_BUCKET and AWS_S3_BUCKET_PATH (default: ''); - to be provided with AWS credentials for this S3 bucket, in environment variables AWS_ACCESS_KEY and AWS_SECRET_KEY; -- the passphrase to unlock the GPG key specified by the optional environment - variable GPG_KEYID (default: releasedocker) which will sign the deb - packages (passed as environment variable GPG_PASSPHRASE); - a generous amount of good will and nice manners. The canonical way to run me is to run the image produced by the Dockerfile: e.g.:" docker run -e AWS_S3_BUCKET=test.docker.com \ -e AWS_ACCESS_KEY=... \ -e AWS_SECRET_KEY=... \ - -e GPG_PASSPHRASE=... \ -i -t --privileged \ docker ./hack/release.sh EOF @@ -41,8 +37,6 @@ EOF [ "$AWS_S3_BUCKET" ] || usage [ "$AWS_ACCESS_KEY" ] || usage [ "$AWS_SECRET_KEY" ] || usage -[ "$GPG_PASSPHRASE" ] || usage -: ${GPG_KEYID:=releasedocker} [ -d /go/src/github.com/docker/docker ] || usage cd /go/src/github.com/docker/docker [ -x hack/make.sh ] || usage @@ -51,7 +45,6 @@ RELEASE_BUNDLES=( binary cross tgz - ubuntu ) if [ "$1" != '--release-regardless-of-test-failure' ]; then @@ -261,69 +254,6 @@ release_build() { upload_release_build "$tgzDir/$tgz" "$s3Dir/$tgz" "$latestTgz" } -# Upload the 'ubuntu' bundle to S3: -# 1. A full APT repository is published at $BUCKET/ubuntu/ -# 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/index -release_ubuntu() { - echo "Releasing ubuntu" - [ -e "bundles/$VERSION/ubuntu" ] || { - echo >&2 './hack/make.sh must be run before release_ubuntu' - exit 1 - } - - local debfiles=( "bundles/$VERSION/ubuntu/"*.deb ) - - # Sign our packages - dpkg-sig -g "--passphrase $GPG_PASSPHRASE" -k "$GPG_KEYID" --sign builder "${debfiles[@]}" - - # Setup the APT repo - APTDIR=bundles/$VERSION/ubuntu/apt - mkdir -p "$APTDIR/conf" "$APTDIR/db" - s3cmd sync "s3://$BUCKET/ubuntu/db/" "$APTDIR/db/" || true - cat > "$APTDIR/conf/distributions" < "bundles/$VERSION/ubuntu/gpg" - s3cmd --acl-public put "bundles/$VERSION/ubuntu/gpg" "s3://$BUCKET/gpg" - - local gpgFingerprint=36A1D7869245C8950F966E92D8576A8BA88D21E9 - local s3Headers= - if [[ $BUCKET == test* ]]; then - gpgFingerprint=740B314AE3941731B942C66ADF4FD13717AAD7D6 - elif [[ $BUCKET == experimental* ]]; then - gpgFingerprint=E33FF7BF5C91D50A6F91FFFD4CC38D40F9A96B49 - s3Headers='--add-header=Cache-Control:no-cache' - fi - - # Upload repo - s3cmd --acl-public $s3Headers sync "$APTDIR/" "s3://$BUCKET/ubuntu/" - cat </dev/null || { - gpg --gen-key --batch <