+ - 'bottlenecks-trigger-{pod}'
+
+ builders:
+ - 'bottlenecks-fetch-os-creds'
+ - 'bottlenecks-run-{suite}'
+
+ publishers:
+ - email:
+ recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com liyiting@huawei.com
+
+####################
+# parameter macros
+####################
+- parameter:
+ name: bottlenecks-parameter
+ parameters:
+ - string:
+ name: CACHE_DIR
+ default: $WORKSPACE/cache/{suite}
+ description: "the cache to store packages downloaded from public IP"
+ - string:
+ name: SUITE_URL
+ default: gs://artifacts.opnfv.org/bottlenecks/{suite}{gs-pathname}
+ description: "LF artifacts url for storage of bottlenecks packages"
+ - string:
+ name: PACKAGE_URL
+ default: http://205.177.226.237:9999/bottlenecks/{suite}/
+ description: "the url where we store the packages used for bottlenecks rubbos"
+
+###################################
+#builders for bottlenecks project
+###################################
+- builder:
+ name: bottlenecks-fetch-os-creds
+ builders:
+ - shell:
+ !include-raw ../../utils/fetch_os_creds.sh
+
+- builder:
+ name: bottlenecks-run-rubbos
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+
+ echo "Bottlenecks: rubbos running now..."
+ cd $WORKSPACE
+ ./ci/run.sh $GERRIT_REFSPEC_DEBUG
+
+- builder:
+ name: bottlenecks-run-vstf
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+
+ echo "Bottlenecks: vstf running now..."
+ cd $WORKSPACE
+ ./ci/vstf_run.sh $GERRIT_REFSPEC_DEBUG
+- 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 -v
+ echo "bottlenecks: copy file $CACHE_DIR/$file to $SUITE_URL"
+ gsutil cp $CACHE_DIR/$file $SUITE_URL
+ done
+
+- builder:
+ name: bottlenecks-workspace-cleanup
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+
+ echo "Bottlenecks: cleanup cache used for storage downloaded packages"
+
+ /bin/rm -rf $CACHE_DIR
+
+#######################
+#trigger macros
+#######################
+- trigger:
+ name: 'bottlenecks-trigger-lf'
+ triggers:
+ - timed: '0 6 * * *'