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'
57 server-name: 'gerrit.opnfv.org'
59 - patchset-created-event:
60 exclude-drafts: 'false'
61 exclude-trivial-rebase: 'false'
62 exclude-no-code-change: 'false'
63 - draft-published-event
64 - comment-added-contains-event:
65 comment-contains-value: 'recheck'
66 - comment-added-contains-event:
67 comment-contains-value: 'reverify'
69 - project-compare-type: 'ANT'
70 project-pattern: '{project}'
72 - branch-compare-type: 'ANT'
73 branch-pattern: '**/{branch}'
76 #- bottlenecks-unit-tests
79 name: 'bottlenecks-merge-{stream}'
81 disabled: '{obj:disabled}'
88 - 'opnfv-build-ubuntu-defaults'
92 credentials-id: '{ssh-credentials}'
94 choosing-strategy: 'default'
98 server-name: 'gerrit.opnfv.org'
100 - change-merged-event
101 - comment-added-contains-event:
102 comment-contains-value: 'remerge'
104 - project-compare-type: 'ANT'
105 project-pattern: '{project}'
107 - branch-compare-type: 'ANT'
108 branch-pattern: '**/{branch}'
112 #- bottlenecks-unit-tests
115 name: 'bottlenecks-{suite}-upload-artifacts-{stream}'
118 disabled: '{obj:disabled}'
132 - 'opnfv-build-ubuntu-defaults'
133 - bottlenecks-parameter:
134 gs-packagepath: '{gs-packagepath}'
138 credentials-id: '{ssh-credentials}'
143 - 'bottlenecks-builder-upload-artifact'
144 - 'bottlenecks-workspace-cleanup'
150 name: bottlenecks-parameter
154 default: $WORKSPACE/cache{gs-packagepath}
155 description: "the cache to store packages downloaded from public IP"
158 default: gs://artifacts.opnfv.org/bottlenecks{gs-packagepath}
159 description: "LF artifacts url for storage of bottlenecks packages"
162 default: http://205.177.226.237:9999/bottlenecks{gs-packagepath}/
163 description: "the url where we store the packages used for bottlenecks rubbos"
165 ####################################
166 #builders for bottlenecks project
167 ####################################
169 name: bottlenecks-builder-upload-artifact
175 echo "Bottlenecks: upload to artifacts from the public IP"
177 [[ -d $CACHE_DIR ]] || mkdir -p $CACHE_DIR
179 for file in $(curl -s $PACKAGE_URL |
183 grep '^[a-zA-Z].*'); do
184 curl --connect-timeout 10 -o $CACHE_DIR/$file $PACKAGE_URL$file -v
185 echo "bottlenecks: copy file $CACHE_DIR/$file to $SUITE_URL"
186 gsutil cp $CACHE_DIR/$file $SUITE_URL
190 name: bottlenecks-workspace-cleanup
196 echo "Bottlenecks: cleanup cache used for storage downloaded packages"
198 /bin/rm -rf $CACHE_DIR
201 name: bottlenecks-unit-tests
208 echo "Running unit tests..."
210 virtualenv $WORKSPACE/bottlenecks_venv
211 source $WORKSPACE/bottlenecks_venv/bin/activate
213 # install python packages
214 easy_install -U setuptools
216 pip install -r requirements.txt
219 /bin/bash $WORKSPACE/tests.sh
224 name: bottlenecks-hello