summaryrefslogtreecommitdiffstats
path: root/jjb/bottlenecks/bottlenecks-project-jobs.yml
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2016-04-11 04:32:00 -0400
committerMatthewLi <matthew.lijun@huawei.com>2016-04-12 04:25:44 -0400
commit6c11c324b6edcea601ec38b990ae21b0c7e087d6 (patch)
tree80eb738c5215e3ace88aaad3b7ca1d8c0dd06dd5 /jjb/bottlenecks/bottlenecks-project-jobs.yml
parent81c7a55635d6b64c403a948869064b1d70238ade (diff)
Bottlenecks: rewrite all the request enabled jobs of the project
JIRA: BOTTLENECK-1 Change-Id: I05a02ca26778d4a8214e099356e8956b95176989 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'jjb/bottlenecks/bottlenecks-project-jobs.yml')
-rw-r--r--jjb/bottlenecks/bottlenecks-project-jobs.yml187
1 files changed, 187 insertions, 0 deletions
diff --git a/jjb/bottlenecks/bottlenecks-project-jobs.yml b/jjb/bottlenecks/bottlenecks-project-jobs.yml
new file mode 100644
index 000000000..7dbaeae6b
--- /dev/null
+++ b/jjb/bottlenecks/bottlenecks-project-jobs.yml
@@ -0,0 +1,187 @@
+###################################################
+# Non-ci jobs for Bottlenecks project
+# They will only be enabled on request by projects!
+###################################################
+- project:
+ name: bottlenecks-project-jobs
+
+ project: 'bottlenecks'
+
+ jobs:
+ - 'bottlenecks-verify-{stream}'
+ - 'bottlenecks-merge-{stream}'
+ - 'bottlenecks-{suite}-upload-artifacts-{stream}'
+
+ stream:
+ - master:
+ branch: '{stream}'
+ #This is used for common project file storage
+ gs-pathname: ''
+ #This is used for different test suite dependent packages storage
+ gs-packagepath: '/{suite}'
+ - brahmaputra:
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ gs-packagepath: '/{stream}/{suite}'
+
+ suite:
+ - 'rubbos'
+ - 'vstf'
+
+################################
+# job templates
+################################
+
+- job-template:
+ name: 'bottlenecks-verify-{stream}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: '{branch}'
+ - 'opnfv-build-defaults'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ builders:
+ - shell: |
+ echo "bottlenecks: verify job"
+ #TO DO: this should be changed when the unittest ready
+
+- job-template:
+ name: 'bottlenecks-merge-{stream}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: '{branch}'
+ - 'opnfv-build-defaults'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: 'remerge'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+
+ builders:
+ - shell: |
+ echo "bottlenecks: merge"
+
+- job-template:
+ name: 'bottlenecks-{suite}-upload-artifacts-{stream}'
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - 'ericsson-build-defaults'
+ - bottlenecks-parameter:
+ gs-packagepath: '{gs-packagepath}'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ builders:
+ - 'bottlenecks-builder-upload-artifact'
+ - 'bottlenecks-workspace-cleanup'
+
+####################
+# parameter macros
+####################
+- parameter:
+ name: bottlenecks-parameter
+ parameters:
+ - string:
+ name: CACHE_DIR
+ default: $WORKSPACE/cache{gs-packagepath}
+ description: "the cache to store packages downloaded from public IP"
+ - string:
+ name: SUITE_URL
+ default: gs://artifacts.opnfv.org/bottlenecks{gs-packagepath}
+ description: "LF artifacts url for storage of bottlenecks packages"
+ - string:
+ name: PACKAGE_URL
+ default: http://205.177.226.237:9999/bottlenecks{gs-packagepath}/
+ description: "the url where we store the packages used for bottlenecks rubbos"
+
+####################################
+#builders for bottlenecks project
+####################################
+- 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