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}'
74 - bottlenecks-unit-tests
77 name: 'bottlenecks-merge-{stream}'
79 disabled: '{obj:disabled}'
86 - 'opnfv-build-ubuntu-defaults'
90 credentials-id: '{ssh-credentials}'
92 choosing-strategy: 'default'
98 - comment-added-contains-event:
99 comment-contains-value: 'remerge'
101 - project-compare-type: 'ANT'
102 project-pattern: '{project}'
104 - branch-compare-type: 'ANT'
105 branch-pattern: '**/{branch}'
108 - bottlenecks-unit-tests
111 name: 'bottlenecks-{suite}-upload-artifacts-{stream}'
114 disabled: '{obj:disabled}'
128 - 'opnfv-build-ubuntu-defaults'
129 - bottlenecks-parameter:
130 gs-packagepath: '{gs-packagepath}'
134 credentials-id: '{ssh-credentials}'
139 - 'bottlenecks-builder-upload-artifact'
140 - 'bottlenecks-workspace-cleanup'
146 name: bottlenecks-parameter
150 default: $WORKSPACE/cache{gs-packagepath}
151 description: "the cache to store packages downloaded from public IP"
154 default: gs://artifacts.opnfv.org/bottlenecks{gs-packagepath}
155 description: "LF artifacts url for storage of bottlenecks packages"
158 default: http://205.177.226.237:9999/bottlenecks{gs-packagepath}/
159 description: "the url where we store the packages used for bottlenecks rubbos"
161 ####################################
162 #builders for bottlenecks project
163 ####################################
165 name: bottlenecks-builder-upload-artifact
171 echo "Bottlenecks: upload to artifacts from the public IP"
173 [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR
175 for file in $(curl -s $PACKAGE_URL |
179 grep '^[a-zA-Z].*'); do
180 curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file -v
181 echo "bottlenecks: copy file $CACHE_DIR/$file to $SUITE_URL"
182 gsutil cp $CACHE_DIR/$file $SUITE_URL
186 name: bottlenecks-workspace-cleanup
192 echo "Bottlenecks: cleanup cache used for storage downloaded packages"
194 /bin/rm -rf $CACHE_DIR
197 name: bottlenecks-unit-tests
204 echo "Running unit tests..."
206 virtualenv $WORKSPACE/bottlenecks_venv
207 source $WORKSPACE/bottlenecks_venv/bin/activate
209 # install python packages
210 easy_install -U setuptools
212 pip install -r requirements.txt