1 ###################################################
2 # Non-ci jobs for Bottlenecks project
3 # They will only be enabled on request by projects!
4 ###################################################
6 name: bottlenecks-project-jobs
11 - 'bottlenecks-verify-{stream}'
12 - 'bottlenecks-merge-{stream}'
13 - 'bottlenecks-{suite}-upload-artifacts-{stream}'
18 #This is used for common project file storage
20 #This is used for different test suite dependent packages storage
21 gs-packagepath: '/{suite}'
24 branch: 'stable/{stream}'
25 gs-pathname: '/{stream}'
26 gs-packagepath: '/{stream}/{suite}'
33 ################################
35 ################################
38 name: 'bottlenecks-verify-{stream}'
40 disabled: '{obj:disabled}'
47 - 'opnfv-build-ubuntu-defaults'
51 credentials-id: '{ssh-credentials}'
52 refspec: '$GERRIT_REFSPEC'
53 choosing-strategy: 'gerrit'
58 - patchset-created-event:
59 exclude-drafts: 'false'
60 exclude-trivial-rebase: 'false'
61 exclude-no-code-change: 'false'
62 - draft-published-event
63 - comment-added-contains-event:
64 comment-contains-value: 'recheck'
65 - comment-added-contains-event:
66 comment-contains-value: 'reverify'
68 - project-compare-type: 'ANT'
69 project-pattern: '{project}'
71 - branch-compare-type: 'ANT'
72 branch-pattern: '**/{branch}'
75 #- bottlenecks-unit-tests
78 name: 'bottlenecks-merge-{stream}'
80 disabled: '{obj:disabled}'
87 - 'opnfv-build-ubuntu-defaults'
91 credentials-id: '{ssh-credentials}'
93 choosing-strategy: 'default'
99 - comment-added-contains-event:
100 comment-contains-value: 'remerge'
102 - project-compare-type: 'ANT'
103 project-pattern: '{project}'
105 - branch-compare-type: 'ANT'
106 branch-pattern: '**/{branch}'
110 #- bottlenecks-unit-tests
113 name: 'bottlenecks-{suite}-upload-artifacts-{stream}'
116 disabled: '{obj:disabled}'
130 - 'opnfv-build-ubuntu-defaults'
131 - bottlenecks-parameter:
132 gs-packagepath: '{gs-packagepath}'
136 credentials-id: '{ssh-credentials}'
141 - 'bottlenecks-builder-upload-artifact'
142 - 'bottlenecks-workspace-cleanup'
148 name: bottlenecks-parameter
152 default: $WORKSPACE/cache{gs-packagepath}
153 description: "the cache to store packages downloaded from public IP"
156 default: gs://artifacts.opnfv.org/bottlenecks{gs-packagepath}
157 description: "LF artifacts url for storage of bottlenecks packages"
160 default: http://205.177.226.237:9999/bottlenecks{gs-packagepath}/
161 description: "the url where we store the packages used for bottlenecks rubbos"
163 ####################################
164 #builders for bottlenecks project
165 ####################################
167 name: bottlenecks-builder-upload-artifact
173 echo "Bottlenecks: upload to artifacts from the public IP"
175 [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR
177 for file in $(curl -s $PACKAGE_URL |
181 grep '^[a-zA-Z].*'); do
182 curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file -v
183 echo "bottlenecks: copy file $CACHE_DIR/$file to $SUITE_URL"
184 gsutil cp $CACHE_DIR/$file $SUITE_URL
188 name: bottlenecks-workspace-cleanup
194 echo "Bottlenecks: cleanup cache used for storage downloaded packages"
196 /bin/rm -rf $CACHE_DIR
199 name: bottlenecks-unit-tests
206 echo "Running unit tests..."
208 virtualenv $WORKSPACE/bottlenecks_venv
209 source $WORKSPACE/bottlenecks_venv/bin/activate
211 # install python packages
212 easy_install -U setuptools
214 pip install -r requirements.txt
217 /bin/bash $WORKSPACE/tests.sh
222 name: bottlenecks-hello