You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ho...@apache.org on 2017/10/06 14:23:35 UTC

[incubator-openwhisk-wskdeploy] branch master updated: publish to docker (#596)

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

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 09f2c03  publish to docker (#596)
09f2c03 is described below

commit 09f2c036207625b081dbc8f0376d104e45331186
Author: Belinda Vennam <be...@gmail.com>
AuthorDate: Fri Oct 6 09:23:33 2017 -0500

    publish to docker (#596)
    
    * publish to docker
    
    * chmod 755
    
    * spacing
    
    * docker_user
    
    * provider script instead of after script
---
 .travis.yml                    |  9 ++++++++-
 tools/travis/docker/Dockerfile |  7 +++++++
 tools/travis/docker/publish.sh | 19 +++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 8515064..a364335 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,7 +29,7 @@ before_deploy:
 - export RELEASE_PKG_FILE=$(ls $build_file_name-*.*)
 - echo "Deploying $RELEASE_PKG_FILE to GitHub releases."
 deploy:
-  provider: releases
+- provider: releases
   api_key:
     secure: aQGcP7XKlgZEFZ57y4RzYRHfQAM5HEdaa7Y/vTxNepIsE7zY2945qT99UJnU1hfhSjP9jO5eNlHzo+AqJoUx70+iUIhMTyOp39Qp7wb74OKolkXwcntufzP7Ocron5IYUE311tf/kic3vRb5cwoaE2lGfx5PdCuozVjgpsDbIRvV5quQzNr68Toqe+yegKwAhprYRWHPnuIqGbkfa83csqFv6m0viC/gvtFOCB9/4zGCqk/K3CKrcr/5GvnFPxJoaJNfFA6umSZ9VaJjbIJmcXGD3nU+rWP0uEpvzGKIMYhmQq/0JuUTgvh4jnnT4OVZeTh6pMaUqtWH+3HDrOiLAiLjcfeT91j7ZXPnx8LvM6SuoRlvRCuXA2FYx9mz2Vx0TWV5TMqhj3okVO/CvvnMMWwKWOUDD/nSMLy93BM40NjD7zimGjocPsGAjTT9H1PSfau3fiiMjg6iMRWjUTfNY5ra5Wgb7W5G [...]
   file_glob: true
@@ -40,6 +40,13 @@ deploy:
     repo: apache/incubator-openwhisk-wskdeploy
     tags: true
     condition: "$DEPLOY_BUILD_READY = true"
+- provider: script
+  skip_cleanup: true
+  script: "./tools/travis/docker/publish.sh openwhisk wskdeploy ${TRAVIS_TAG}"
+  on:
+    repo: apache/incubator-openwhisk-wskdeploy
+    tags: true
+    condition: "$DEPLOY_BUILD_READY = true"
 env:
   global:
   - BLUEMIX_APIHOST=openwhisk.ng.bluemix.net
diff --git a/tools/travis/docker/Dockerfile b/tools/travis/docker/Dockerfile
new file mode 100755
index 0000000..8f40276
--- /dev/null
+++ b/tools/travis/docker/Dockerfile
@@ -0,0 +1,7 @@
+FROM openwhisk/nodejs6action
+
+RUN apt-get update \
+  && apt-get install -y git \
+  && npm install --save simple-git js-yaml
+
+COPY wskdeploy /nodejsAction/
diff --git a/tools/travis/docker/publish.sh b/tools/travis/docker/publish.sh
new file mode 100755
index 0000000..7373570
--- /dev/null
+++ b/tools/travis/docker/publish.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -eu
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+
+dockerhub_image_prefix="$1"
+dockerhub_image_name="$2"
+dockerhub_image_tag="$3"
+dockerhub_image="${dockerhub_image_prefix}/${dockerhub_image_name}:${dockerhub_image_tag}"
+
+docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}"
+
+cp $TRAVIS_BUILD_DIR/build/linux/wskdeploy $SCRIPTDIR/
+
+echo docker build $SCRIPTDIR --tag ${dockerhub_image}
+docker build $SCRIPTDIR --tag ${dockerhub_image}
+
+echo docker push ${dockerhub_image}
+docker push ${dockerhub_image}

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].