You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by da...@apache.org on 2018/03/27 08:50:37 UTC
[incubator-openwhisk-release] branch master updated: Publish the
binaries of openwhisk cli and wskdeploy (#69)
This is an automated email from the ASF dual-hosted git repository.
daisyguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-release.git
The following commit(s) were added to refs/heads/master by this push:
new 42481ec Publish the binaries of openwhisk cli and wskdeploy (#69)
42481ec is described below
commit 42481eccf4a2e4317b33576f5fa8095b12bae468
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Tue Mar 27 04:50:34 2018 -0400
Publish the binaries of openwhisk cli and wskdeploy (#69)
This PR adds the support to push the binaries of openwhisk cli and
wskdeploy into the staging url in Apache.
---
.travis.yml | 2 +-
tools/config.json | 10 +++---
tools/download_source_code.sh | 3 --
...download_source_code.sh => package_binaries.sh} | 39 ++++++----------------
tools/sign_artifacts.sh | 2 +-
.../{package_source_code.sh => package_project.sh} | 1 +
6 files changed, 19 insertions(+), 38 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index b5baae4..9331e2b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,7 +34,7 @@ jobs:
#- stage: deploy
# script: ./tools/travis/setup.sh
- stage: package
- script: ./tools/travis/package_source_code.sh $(dirname "$TRAVIS_BUILD_DIR") $SVN_USERNAME $SVN_PASSWORD
+ script: ./tools/travis/package_project.sh $(dirname "$TRAVIS_BUILD_DIR") $SVN_USERNAME $SVN_PASSWORD
before_install:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then
diff --git a/tools/config.json b/tools/config.json
index 0d6743b..20cd582 100644
--- a/tools/config.json
+++ b/tools/config.json
@@ -26,14 +26,16 @@
"branch": "master"
},
"openwhisk_wskdeploy": {
- "hash": "c08d805",
+ "hash": "063263c",
"repository": "https://github.com/apache/incubator-openwhisk-wskdeploy.git",
- "branch": "master"
+ "branch": "master",
+ "binaries": "yes"
},
"openwhisk_cli": {
- "hash": "ff385df",
+ "hash": "ba08720",
"repository": "https://github.com/apache/incubator-openwhisk-cli.git",
- "branch": "master"
+ "branch": "master",
+ "binaries": "yes"
},
"openwhisk_client_go": {
"hash": "012fd0f",
diff --git a/tools/download_source_code.sh b/tools/download_source_code.sh
index f019e4e..a431465 100755
--- a/tools/download_source_code.sh
+++ b/tools/download_source_code.sh
@@ -38,9 +38,6 @@ function git_clone_repo() {
rm -rf $OPENWHISK_SOURCE_DIR/*
-CONFIG=$(read_file $SCRIPTDIR/config.json)
-repos=$(echo $(json_by_key "$CONFIG" "RepoList") | sed 's/[][]//g')
-
for repo in $(echo $repos | sed "s/,/ /g")
do
repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
diff --git a/tools/download_source_code.sh b/tools/package_binaries.sh
similarity index 52%
copy from tools/download_source_code.sh
copy to tools/package_binaries.sh
index f019e4e..d7eac66 100755
--- a/tools/download_source_code.sh
+++ b/tools/package_binaries.sh
@@ -18,40 +18,21 @@
set -e
-WORK_DIR=${1:-"$HOME"}
+echo "Package the binaries."
SCRIPTDIR="$(cd $(dirname "$0")/ && pwd)"
-source "$SCRIPTDIR/load_config.sh" $1
-
-clone_depth=${2:-"100"}
-
-function git_clone_repo() {
- PROJECT_NAME=$1
- HASH=$2
- REPO=$3
- BRANCH=$4
- git clone --depth $clone_depth -b $BRANCH $REPO $OPENWHISK_SOURCE_DIR/$PROJECT_NAME
- cd $OPENWHISK_SOURCE_DIR/$PROJECT_NAME
- git reset --hard $HASH
- #rm -rf .git
-}
-
-rm -rf $OPENWHISK_SOURCE_DIR/*
-
-CONFIG=$(read_file $SCRIPTDIR/config.json)
-repos=$(echo $(json_by_key "$CONFIG" "RepoList") | sed 's/[][]//g')
+source "$SCRIPTDIR/load_config.sh" $1 $2 $3
for repo in $(echo $repos | sed "s/,/ /g")
do
repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
- HASH_KEY=${repo_name//-/_}.hash
- REPO_KEY=${repo_name//-/_}.repository
- REPO_BRANCH=${repo_name//-/_}.branch
- HASH=$(json_by_key "$CONFIG" $HASH_KEY)
- REPO=$(json_by_key "$CONFIG" $REPO_KEY)
- BRANCH=$(json_by_key "$CONFIG" $REPO_BRANCH)
- if [ "$HASH" != "null" ]; then
- echo "The hash for $repo_name is $HASH"
- git_clone_repo $repo_name $HASH $REPO $BRANCH
+ # Build the binaries
+ BINARIES=${repo_name//-/_}.binaries
+ PUBLISH_BINARIES=$(json_by_key "$CONFIG" $BINARIES)
+ if [ "$PUBLISH_BINARIES" == "yes" ] ; then
+ cd $OPENWHISK_SOURCE_DIR/$repo_name
+ ./gradlew releaseBinaries -PpackageVersion=${version}
+ # Copy all the binary artifacts into the directory ${CURRENT_VERSION_DIR}
+ cp -r release/. ${CURRENT_VERSION_DIR}/
fi
done
diff --git a/tools/sign_artifacts.sh b/tools/sign_artifacts.sh
index e2a1975..e5cca17 100755
--- a/tools/sign_artifacts.sh
+++ b/tools/sign_artifacts.sh
@@ -36,7 +36,7 @@ fi
cd $CURRENT_VERSION_DIR
echo "Sign the artifacts with the private key."
-for artifact in *.tar.gz; do
+for artifact in *.tar.gz *.zip *.tgz; do
gpg --print-md MD5 ${artifact} > ${artifact}.md5
gpg --print-md SHA512 ${artifact} > ${artifact}.sha512
diff --git a/tools/travis/package_source_code.sh b/tools/travis/package_project.sh
similarity index 95%
rename from tools/travis/package_source_code.sh
rename to tools/travis/package_project.sh
index 9a54dee..6986ed5 100755
--- a/tools/travis/package_source_code.sh
+++ b/tools/travis/package_project.sh
@@ -37,6 +37,7 @@ fi
"$PARENTDIR/package_source_code.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
+"$PARENTDIR/package_binaries.sh" "$WORK_DIR" "$SVN_USERNAME" "$SVN_PASSWORD"
if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$PUBLISH_STAGE" == "true" ] ; then
"$CURRENTDIR/import_pgp_key.sh"
--
To stop receiving notification emails like this one, please contact
daisyguo@apache.org.