You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@quickstep.apache.org by cramja <gi...@git.apache.org> on 2017/02/28 18:44:57 UTC

[GitHub] incubator-quickstep pull request #199: Init release scripts

GitHub user cramja opened a pull request:

    https://github.com/apache/incubator-quickstep/pull/199

    Init release scripts

    Includes:
    - command to create artifacts
    - command to publish release candidates
    - command to test a release candidate
    
    All commands are parameterized by the .profile file
    
    @hakanmemisoglu is it perfect?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cramja/incubator-quickstep add-release-scripts

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-quickstep/pull/199.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #199
    
----
commit 09ac3ebc2ce7509d809198698f9e71959c7bdbe8
Author: cramja <ma...@gmail.com>
Date:   2017-02-28T17:13:30Z

    Init release scripts
    Includes:
    - command to create artifacts
    - command to publish release candidates
    - command to test a release candidate
    
    All commands are parameterized by the .profile file

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-quickstep pull request #199: Init release scripts

Posted by zuyu <gi...@git.apache.org>.
Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/199#discussion_r103599402
  
    --- Diff: release/release_cmds.sh ---
    @@ -0,0 +1,135 @@
    +#!/usr/bin/bash
    +
    +# Functions for Releasing Quickstep
    +# Usage: Fill out your details in release_manager.profile. Then source this file
    +#
    +# Note: This script is a scratch pad with most of the relevent commands. Modify 
    +#       it to see fit. We'll finalize it when we understand the process better.
    +#       
    +#       Everything in this script assumes that you are running in the release/ 
    +#       folder of your quickstep directory.
    +#
    +# PREREQS:
    +#  - full details on how to do a release is in a confluence article: How to Release
    +#  - You must have previously created a pgp key using your apache username
    +#    and uploaded it to a keyserver [http://quickstep.apache.org/release-signing/]
    +#
    +
    +source release_manager.profile
    +
    +create_artifacts() {
    +  # Updates submodules, archives everything, signs it using your key (requires 
    +  # user input), makes checksums, moves artifacts to release/ folder
    +  #
    +  export RELEASE_DIR=`pwd`
    +  cd ..
    +
    +  # need the submodules to be included for the compile to work.
    +  # likely, this will be a no-op
    +  git submodule init
    +  git submodule update
    +
    +  # you'll need to push this if you want the tag to be visible to committers
    +  # the tag is necesary for the archiving to work correctly
    +  git tag -a rc-$VERSION -m 'release candidate $VERSION'
    +  git archive --format "tar" --prefix=$PROJECT_NAME-$VERSION/ -o $PROJECT_NAME-$VERSION.tar rc-$VERSION
    +  git submodule foreach --recursive 'git archive --verbose --prefix=$PROJECT_NAME-$VERSION/$path/ --format tar master --output $RELEASE_DIR/submodule-$sha1.tar'
    +  if [[ $(ls submodule-*.tar | wc -l) != 0  ]]; then
    +    # combine all archives into one tar
    +    tar --concatenate --file $PROJECT_NAME-$VERSION.tar submodule-*.tar
    +    # remove sub tars
    +    rm -rf submodule-*.tar
    +  fi
    +
    +  # gzip final tar
    +  gzip --force --verbose $PROJECT_NAME-$VERSION.tar
    +
    +  # Make the signature. This requires human input
    +  gpg -u $APACHE_USERNAME@apache.org --armor --output $PROJECT_NAME-$VERSION.tar.gz.asc --detach-sign $PROJECT_NAME-$VERSION.tar.gz
    +  # Make hashes
    +  md5sum $PROJECT_NAME-$VERSION.tar.gz > $PROJECT_NAME-$VERSION.tar.gz.md5
    +  sha1sum $PROJECT_NAME-$VERSION.tar.gz > $PROJECT_NAME-$VERSION.tar.gz.sha
    +
    +
    +  # Make sure these three artifacts are good
    +  gpg --verify $PROJECT_NAME-$VERSION.tar.gz.asc
    +  md5sum --check $PROJECT_NAME-$VERSION.tar.gz.md5
    +  sha1sum --check $PROJECT_NAME-$VERSION.tar.gz.sha
    +
    +  mv $PROJECT_NAME-$VERSION.tar.gz* $RELEASE_DIR
    +
    +  cd $RELEASE_DIR
    +}
    +
    +publish_candidate() {
    +  # push a RC to subversion. We use SVN sparse directories so as not to pull
    +  # every artifact ever. Assumes that you have already created the artifacts
    +  # and they reside in the release/ folder.
    +  # directory layout is x.y.z/RCw, where w is the release candidate number
    +  #
    +
    +  if [ ! -d "$SVN_DEV" ]; then
    +    svn checkout --depth immediates $SVN_DEV_URL $SVN_DEV
    +  fi
    +
    +  BASE_DIR=`pwd`
    +  cd $SVN_DEV
    +
    +  if [ ! -d "$VERSION" ]; then
    +    mkdir $VERSION
    +    cd $VERSION
    +  else
    +    cd $VERSION
    +    svn update --set-depth immediates .
    +  fi
    +
    +  # now in $VERSION folder
    +
    +  RCFOLDER=RC$CANDIDATE
    +  mkdir $RCFOLDER
    +  cd $RCFOLDER
    +  cp $BASE_DIR/$PROJECT_NAME-$VERSION.tar.gz* ./
    +  cd ..
    +
    +  svn add $VERSION/$RCFOLDER
    +  svn commit --username=$APACHE_USERNAME -m "Quickstep-$VERSION RC$CANDIDATE"
    +
    +  cd $BASE_DIR
    +}
    +
    +test_candidate() {
    +  # This is best run in /tmp
    +  # tries checking out a release candidate and building
    +  #
    +  
    +  echo "testing ..."
    +
    +  svn checkout --depth immediates $SVN_DEV_URL $SVN_DEV
    +  cd $SVN_DEV
    +
    +  # add the KEYS file from quickstep to your gpg key ring
    +  gpg --import KEYS
    +
    +  cd $VERSION
    +  svn update --set-depth infinity RC$CANDIDATE
    +  cd RC$CANDIDATE
    +
    +  tar -xzf $PROJECT_NAME-$VERSION.tar.gz
    +
    +  # verify artifacts
    +  gpg --verify $PROJECT_NAME-$VERSION.tar.gz.asc
    +  md5sum --check $PROJECT_NAME-$VERSION.tar.gz.md5
    +  sha1sum --check $PROJECT_NAME-$VERSION.tar.gz.sha
    +
    +  # now build the release artifacts
    +  cd $PROJECT_NAME-$VERSION
    +
    +  # first download third_party, then do your normal build
    +  cd third_party/
    +  ./download_and_patch_prerequisites.sh
    +  cd ..
    +  cd build
    +  cmake ..
    +  make
    +}
    +
    --- End diff --
    
    Remove this empty line.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-quickstep pull request #199: Init release scripts

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-quickstep/pull/199


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-quickstep pull request #199: Init release scripts

Posted by zuyu <gi...@git.apache.org>.
Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/199#discussion_r103599270
  
    --- Diff: release/release_manager.profile ---
    @@ -0,0 +1,28 @@
    +# Profile for Releasing Quickstep
    +#
    +# This script is for release managers. It is to be used in conjunction with 
    +# the release_cmds script.
    +#
    +# Usage: Fill out this file with your apache details. Then source this file.
    +#        Sourcing the release_cmds file will automatically source this.
    +#
    +
    +# you must be registered with apache
    +export APACHE_USERNAME=
    +
    +# quickstep version, Major.Minor.Increment
    +export VERSION=
    +
    +# release candidate number. For a new version, this starts at 0
    +export CANDIDATE=
    +
    +# folders corresponding to SVN repos where we keep our release artifacts
    +export SVN_DEV=svn-quickstep-dev
    +export SVN_REL=svn-quickstep-rel
    +
    +# you probably will not need to change things below this line
    +export PROJECT_NAME=apache-quickstep-incubating
    +
    +# path to apache repo with quickstep releases
    +export SVN_DEV_URL=https://dist.apache.org/repos/dist/dev/incubator/quickstep
    +export SVN_REL_URL=https://dist.apache.org/repos/dist/rel/incubator/quickstep
    --- End diff --
    
    Add `\n` here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-quickstep issue #199: Init release scripts

Posted by jianqiao <gi...@git.apache.org>.
Github user jianqiao commented on the issue:

    https://github.com/apache/incubator-quickstep/pull/199
  
    LGTM! Merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-quickstep issue #199: Init release scripts

Posted by cramja <gi...@git.apache.org>.
Github user cramja commented on the issue:

    https://github.com/apache/incubator-quickstep/pull/199
  
    @jianqiao it's gtg


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---