summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2015-12-30 06:39:42 -0500
committerMatthewLi <matthew.lijun@huawei.com>2015-12-30 21:17:32 -0500
commitff24a9bb479b4ac49541796753b6e962c08f5c48 (patch)
treeca59ea6ae5eaae7789cebfceaec693f7445429d1
parent7d8f4fda892d856c185e2629652403477dc11c0a (diff)
upload the packages used for bottlenecks to artifacts.opnfv.org
JIRA: BOTTLENECK-4 Change-Id: I4e07069b00b5a9e4ee4d2123b93f8b11ba1c921e Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
-rw-r--r--jjb/bottlenecks/bottlenecks.yml67
1 files changed, 66 insertions, 1 deletions
diff --git a/jjb/bottlenecks/bottlenecks.yml b/jjb/bottlenecks/bottlenecks.yml
index 249a1bd6e..eef0bf434 100644
--- a/jjb/bottlenecks/bottlenecks.yml
+++ b/jjb/bottlenecks/bottlenecks.yml
@@ -6,7 +6,7 @@
jobs:
- 'bottlenecks-verify-{stream}'
- 'bottlenecks-daily-{installer}-{pod}-{stream}'
-
+ - 'bottlenecks-upload-artifacts-{stream}'
pod:
- lf:
node: 'opnfv-jump-2'
@@ -72,6 +72,32 @@
echo "Nothing to verify!"
- job-template:
+ name: 'bottlenecks-upload-artifacts-{stream}'
+
+ node: ericsson-build
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ builders:
+ - 'bottlenecks-builder-upload-artifact'
+
+- job-template:
name: 'bottlenecks-daily-{installer}-{pod}-{stream}'
disabled: false
@@ -115,6 +141,25 @@
- email:
recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com
+####################
+# parameter macros
+####################
+- parameter:
+ name: bottlenecks-parameter
+ parameters:
+ -string:
+ name: CACHE_DIR
+ default: $WORKSPACE/cache
+ description: "the cache to store packages downloaded from public IP"
+ -string:
+ name: RUBBOS_URL
+ default: http://artifacts.opnfv.org/bottlenecks/rubbos
+ description: "LF artifacts url for storage of bottlenecks packages"
+ -string:
+ name: PACKAGE_URL
+ default: http://205.177.226.235:9999/bottlenecks/rubbos/
+ description: "the url where we store the packages used for bottlenecks rubbos"
+
###################################
#builders for bottlenecks project
###################################
@@ -176,6 +221,26 @@
ssh $CONTROL_HOST
./tmp/CONTROL_rubbos_exec.sh
+- builder:
+ name: bottlenecks-builder-upload-artifact
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+
+ echo "Bottlenecks: upload to artifacts from the public IP"
+
+ [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR
+
+ for file in $(curl -s $PACKAGE_URL |
+ grep href |
+ sed 's/.*href="//' |
+ sed 's/".*//' |
+ grep '^[a-zA-Z].*'); do
+ curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file
+ gsutil cp $CACHE_DIR/$file $RUBBOS_URL
+ done
+
#######################
#trigger macros
#######################