You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mr...@apache.org on 2018/02/21 19:48:05 UTC

[incubator-openwhisk-release] branch master updated: Update the configuration by adding all the repos able to package sources (#44)

This is an automated email from the ASF dual-hosted git repository.

mrutkowski 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 ceb7b68  Update the configuration by adding all the repos able to package sources (#44)
ceb7b68 is described below

commit ceb7b687fb300813899c2f0706f8431f645f6924
Author: Vincent <sh...@us.ibm.com>
AuthorDate: Wed Feb 21 14:48:01 2018 -0500

    Update the configuration by adding all the repos able to package sources (#44)
    
    This PR makes it possible to packages all the source code of openwhisk
    projects by using rsync and tar commands.
    
    Partially-Closes: #20
---
 tools/config.json             | 76 ++++++++++++++++++++++++++++++++++++-------
 tools/download_source_code.sh |  3 +-
 tools/load_config.sh          |  6 ++--
 tools/package_source_code.sh  | 18 +++++-----
 tools/sign_artifacts.sh       | 14 +-------
 tools/upload_artifacts.sh     | 25 +-------------
 6 files changed, 80 insertions(+), 62 deletions(-)

diff --git a/tools/config.json b/tools/config.json
index ed25132..009be41 100644
--- a/tools/config.json
+++ b/tools/config.json
@@ -6,23 +6,77 @@
     "minor": "rc1"
   },
   "RepoList": [
-    "incubator-openwhisk",
-    "incubator-openwhisk-wskdeploy",
-    "incubator-openwhisk-cli"
+    "openwhisk",
+    "openwhisk-wskdeploy",
+    "openwhisk-cli",
+    "openwhisk-client-go",
+    "openwhisk-catalog",
+    "openwhisk-apigateway",
+    "openwhisk-runtime-nodejs",
+    "openwhisk-runtime-swift",
+    "openwhisk-runtime-php",
+    "openwhisk-runtime-java",
+    "openwhisk-runtime-docker",
+    "openwhisk-runtime-python"
   ],
-  "incubator_openwhisk": {
-    "hash": "a891e06",
+  "openwhisk": {
+    "hash": "b55e46c",
     "repository": "https://github.com/apache/incubator-openwhisk.git",
     "branch": "master"
   },
-  "incubator_openwhisk_wskdeploy": {
-    "hash": "1425456",
+  "openwhisk_wskdeploy": {
+    "hash": "fa97469",
     "repository": "https://github.com/apache/incubator-openwhisk-wskdeploy.git",
     "branch": "master"
   },
-  "incubator_openwhisk_cli": {
-    "hash": "90db37e",
-    "repository": "https://github.com/houshengbo/incubator-openwhisk-cli.git",
-    "branch": "add-zip-source"
+  "openwhisk_cli": {
+    "hash": "293573a",
+    "repository": "https://github.com/apache/incubator-openwhisk-cli.git",
+    "branch": "master"
+  },
+  "openwhisk_client_go": {
+    "hash": "72bf712",
+    "repository": "https://github.com/apache/incubator-openwhisk-client-go.git",
+    "branch": "master"
+  },
+  "openwhisk_catalog": {
+    "hash": "ad24d4c",
+    "repository": "https://github.com/apache/openwhisk-catalog.git",
+    "branch": "master"
+  },
+  "openwhisk_apigateway": {
+    "hash": "c0a11bf",
+    "repository": "https://github.com/apache/incubator-openwhisk-apigateway.git",
+    "branch": "master"
+  },
+  "openwhisk_runtime_nodejs": {
+    "hash": "5c7fd31",
+    "repository": "https://github.com/apache/incubator-openwhisk-runtime-nodejs.git",
+    "branch": "master"
+  },
+  "openwhisk_runtime_swift": {
+    "hash": "b320f30",
+    "repository": "https://github.com/apache/incubator-openwhisk-runtime-swift.git",
+    "branch": "master"
+  },
+  "openwhisk_runtime_php": {
+    "hash": "f58d47c",
+    "repository": "https://github.com/apache/incubator-openwhisk-runtime-php.git",
+    "branch": "master"
+  },
+  "openwhisk_runtime_java": {
+    "hash": "1530ff2",
+    "repository": "https://github.com/apache/incubator-openwhisk-runtime-java.git",
+    "branch": "master"
+  },
+  "openwhisk_runtime_docker": {
+    "hash": "c8e8f31",
+    "repository": "https://github.com/apache/incubator-openwhisk-runtime-docker.git",
+    "branch": "master"
+  },
+  "openwhisk_runtime_python": {
+    "hash": "148e578",
+    "repository": "https://github.com/apache/incubator-openwhisk-runtime-python.git",
+    "branch": "master"
   }
 }
diff --git a/tools/download_source_code.sh b/tools/download_source_code.sh
index 8837139..c88856d 100755
--- a/tools/download_source_code.sh
+++ b/tools/download_source_code.sh
@@ -3,10 +3,9 @@
 set -e
 
 WORK_DIR=${1:-"$HOME"}
-OPENWHISK_SOURCE_DIR="$WORK_DIR/openwhisk_sources"
 
 SCRIPTDIR="$(cd $(dirname "$0")/ && pwd)"
-source "$SCRIPTDIR/util.sh"
+source "$SCRIPTDIR/load_config.sh" $1
 
 clone_depth=${2:-"100"}
 
diff --git a/tools/load_config.sh b/tools/load_config.sh
index 0d6b2a3..ef060e7 100755
--- a/tools/load_config.sh
+++ b/tools/load_config.sh
@@ -11,8 +11,10 @@ if [ ! -z "$SVN_USERNAME" ] && [ ! -z "$SVN_PASSWORD" ];then
     CREDENTIALS="--username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive"
 fi
 
-OPENWHISK_SOURCE_DIR="$WORK_DIR/openwhisk_sources"
-OPENWHISK_SVN="$OPENWHISK_SOURCE_DIR/openwhisk"
+OPENWHISK_RELEASE_DIR="$WORK_DIR/openwhisk_release"
+OPENWHISK_SOURCE_DIR="$OPENWHISK_RELEASE_DIR/openwhisk_sources"
+OPENWHISK_CLEANED_SOURCE_DIR="$OPENWHISK_RELEASE_DIR/openwhisk_cleaned_sources"
+OPENWHISK_SVN="$OPENWHISK_RELEASE_DIR/openwhisk"
 
 source "$SCRIPTDIR/util.sh"
 
diff --git a/tools/package_source_code.sh b/tools/package_source_code.sh
index 76829e7..a67d05a 100755
--- a/tools/package_source_code.sh
+++ b/tools/package_source_code.sh
@@ -12,17 +12,15 @@ rm -rf $OPENWHISK_SVN
 mkdir -p $CURRENT_VERSION_DIR
 rm -rf $CURRENT_VERSION_DIR/*
 
+# Clean up all the source code by excluding unnecessary files and folders
+# Remove all the hidden files and folder
+# Remove bin and build folders
+mkdir -p $OPENWHISK_CLEANED_SOURCE_DIR
+rm -rf $OPENWHISK_CLEANED_SOURCE_DIR/*
+rsync -rtp --exclude .*\* --exclude bin\* --exclude build\* $OPENWHISK_SOURCE_DIR/. $OPENWHISK_CLEANED_SOURCE_DIR
+
 for repo in $(echo $repos | sed "s/,/ /g")
 do
     repo_name=$(echo "$repo" | sed -e 's/^"//' -e 's/"$//')
-    echo $repo_name
-    if [ $repo_name != "incubator-openwhisk" ]; then
-    # Only wskdeploy has both the gradle tasks implemented: cleanBuild to clean the build folder, and taredSources
-    # to package the source code.
-        cd $OPENWHISK_SOURCE_DIR/$repo_name
-        ./gradlew cleanBuild
-        ./gradlew taredSources -PprojectVersion=$version
-        # Copy all the source code packages into $CURRENT_VERSION_DIR
-        cp -a build/. $CURRENT_VERSION_DIR
-    fi
+    cd $OPENWHISK_CLEANED_SOURCE_DIR/$repo_name && tar czf ${CURRENT_VERSION_DIR}/${repo_name}-${version}-sources.tar.gz .
 done
diff --git a/tools/sign_artifacts.sh b/tools/sign_artifacts.sh
index c43a166..3c4895b 100755
--- a/tools/sign_artifacts.sh
+++ b/tools/sign_artifacts.sh
@@ -7,20 +7,8 @@ echo "Sign the artifacts with PGP."
 WORK_DIR=${1:-"$HOME"}
 passphrase=${2:-"openwhisk"}
 
-OPENWHISK_SOURCE_DIR="$WORK_DIR/openwhisk_sources"
-OPENWHISK_SVN="$OPENWHISK_SOURCE_DIR/openwhisk"
-
 SCRIPTDIR="$(cd $(dirname "$0")/ && pwd)"
-source "$SCRIPTDIR/util.sh"
-
-CONFIG=$(read_file $SCRIPTDIR/config.json)
-repos=$(echo $(json_by_key "$CONFIG" "RepoList") | sed 's/[][]//g')
-version_key="version"
-version_major=$(json_by_key "$CONFIG" ${version_key}.major)
-version_minor=$(json_by_key "$CONFIG" ${version_key}.minor)
-
-version=$version_major-$version_minor
-CURRENT_VERSION_DIR="$OPENWHISK_SVN/openwhisk-$version"
+source "$SCRIPTDIR/load_config.sh" $1
 
 # Sign all the artifacts with the PGP key.
 export GPG_TTY=$(tty)
diff --git a/tools/upload_artifacts.sh b/tools/upload_artifacts.sh
index df68d8e..164d2fe 100755
--- a/tools/upload_artifacts.sh
+++ b/tools/upload_artifacts.sh
@@ -6,31 +6,8 @@ echo "Upload the artifacts."
 
 WORK_DIR=${1:-"$HOME"}
 
-SVN_USERNAME=$2
-SVN_PASSWORD=$3
-CREDENTIALS=""
-
-if [ ! -z "$SVN_USERNAME" ] && [ ! -z "$SVN_PASSWORD" ];then
-    CREDENTIALS="--username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive"
-fi
-
-OPENWHISK_SOURCE_DIR="$WORK_DIR/openwhisk_sources"
-OPENWHISK_SVN="$OPENWHISK_SOURCE_DIR/openwhisk"
-
 SCRIPTDIR="$(cd $(dirname "$0")/ && pwd)"
-source "$SCRIPTDIR/util.sh"
-
-CONFIG=$(read_file $SCRIPTDIR/config.json)
-STAGE_URL=$(json_by_key "$CONFIG" "stage_url")
-
-version_key="version"
-version_major=$(json_by_key "$CONFIG" ${version_key}.major)
-version_minor=$(json_by_key "$CONFIG" ${version_key}.minor)
-
-version=$version_major-$version_minor
-REMOTE_PATH="openwhisk-$version"
-
-CURRENT_VERSION_URL="$STAGE_URL/${REMOTE_PATH}/"
+source "$SCRIPTDIR/load_config.sh" $1 $2 $3
 
 if [[ `wget -S --spider $CURRENT_VERSION_URL  2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then
     svn delete $CURRENT_VERSION_URL -m "Removing Apache OpenWhisk release ${version} from staging." $CREDENTIALS

-- 
To stop receiving notification emails like this one, please contact
mrutkowski@apache.org.