4 name: project-parameter
9 description: "JJB configured PROJECT parameter to identify an opnfv Gerrit project"
12 default: artifacts.opnfv.org/$PROJECT
13 description: "URL to Google Storage."
16 default: build.opnfv.org/artifacts/$PROJECT
17 description: "URL to Google Storage proxy"
20 name: gerrit-parameter
25 description: "JJB configured GERRIT_BRANCH parameter"
31 credentials-id: '{credentials-id}'
40 name: gerrit-trigger-scm
43 credentials-id: '{credentials-id}'
47 - 'origin/$GERRIT_BRANCH'
49 choosing-strategy: '{choosing-strategy}'
60 name: gerrit-trigger-patch-submitted
63 server-name: 'gerrit.opnfv.org'
65 - patchset-created-event:
66 exclude-drafts: 'false'
67 exclude-trivial-rebase: 'false'
68 exclude-no-code-change: 'false'
69 - draft-published-event
70 - comment-added-contains-event:
71 comment-contains-value: 'recheck'
73 - project-compare-type: 'ANT'
74 project-pattern: '{name}'
76 - branch-compare-type: 'ANT'
77 branch-pattern: '**/{branch}'
80 name: gerrit-trigger-patch-merged
83 server-name: 'gerrit.opnfv.org'
86 - comment-added-contains-event:
87 comment-contains-value: 'remerge'
89 - project-compare-type: 'ANT'
90 project-pattern: '{name}'
92 - branch-compare-type: 'ANT'
93 branch-pattern: '**/{branch}'
96 name: archive-artifacts
99 artifacts: '{artifacts}'
105 name: email-notification
108 recipients: 'jenkins@lists.opnfv.org'
110 content-type: default
111 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
113 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
115 Check console output at $BUILD_URL to view the results.
126 exec-pattern: "**/**.exec"
127 class-pattern: "**/classes"
128 source-pattern: "**/src/main/java"
129 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**"
143 - shell: 'echo testing macro "test-macro"'
146 name: wipe-org-opendaylight-repo
148 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
151 name: jacoco-nojava-workaround
153 - shell: 'mkdir -p $WORKSPACE/target/classes'
159 name: build-html-and-pdf-docs-output
165 export PATH=$PATH:/usr/local/bin/
166 git clone ssh://gerrit.opnfv.org:29418/releng
167 GERRIT_COMMENT=gerrit_comment.txt ./releng/utils/docs-build.sh
170 name: upload-under-review-docs-to-opnfv-artifacts
177 export PATH=$PATH:/usr/local/bin/
179 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
180 [[ -d docs_output ]] || exit 0
183 echo "###########################"
184 echo "UPLOADING DOCS UNDER REVIEW"
185 echo "###########################"
188 gs_base="artifacts.opnfv.org/review"
189 gs_path="$gs_base/$GERRIT_CHANGE_NUMBER"
190 local_path="upload/$GERRIT_CHANGE_NUMBER"
193 mv docs_output "$local_path"
194 gsutil -m cp -r "$local_path" "gs://$gs_base"
196 if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
198 -h "Content-Type:text/html" \
199 -h "Cache-Control:private, max-age=0, no-transform" \
200 "gs://$gs_path"/**.html
203 echo "Document link(s):" >> gerrit_comment.txt
204 find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
205 sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
208 name: upload-generated-docs-to-opnfv-artifacts
215 export PATH=$PATH:/usr/local/bin/
217 [[ -d docs_output ]] || exit 0
220 echo "########################"
221 echo "UPLOADING GENERATED DOCS"
222 echo "########################"
225 gs_path="$GS_URL/docs"
226 local_path="upload/docs"
229 mv docs_output "$local_path"
230 gsutil -m cp -r "$local_path" "gs://$GS_URL"
232 if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
234 -h "Content-Type:text/html" \
235 -h "Cache-Control:private, max-age=0, no-transform" \
236 "gs://$gs_path"/**.html
239 echo "Document link(s):" >> gerrit_comment.txt
240 find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
241 sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
244 name: report-docs-build-result-to-gerrit
251 export PATH=$PATH:/usr/local/bin/
252 if [[ -e gerrit_comment.txt ]] ; then
254 echo "posting review comment to gerrit..."
256 cat gerrit_comment.txt
258 ssh -p 29418 gerrit.opnfv.org \
259 "gerrit review -p $GERRIT_PROJECT \
260 -m '$(cat gerrit_comment.txt)' \
261 $GERRIT_PATCHSET_REVISION"
265 name: remove-old-docs-from-opnfv-artifacts
272 export PATH=$PATH:/usr/local/bin/
274 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
276 gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
278 if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then
280 echo "Deleting Out-of-dated Documents..."
281 gsutil -m rm -r "gs://$gs_path"
285 name: upload-review-docs
287 - build-html-and-pdf-docs-output
288 - upload-under-review-docs-to-opnfv-artifacts
289 - report-docs-build-result-to-gerrit
292 name: upload-merged-docs
294 - build-html-and-pdf-docs-output
295 - upload-generated-docs-to-opnfv-artifacts
296 - report-docs-build-result-to-gerrit
297 - remove-old-docs-from-opnfv-artifacts