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
163 export PATH=$PATH:/usr/local/bin/
164 git clone ssh://gerrit.opnfv.org:29418/releng
165 GERRIT_COMMENT=gerrit_comment.txt ./releng/utils/docs-build.sh
168 name: upload-under-review-docs-to-opnfv-artifacts
173 export PATH=$PATH:/usr/local/bin/
175 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
179 echo "###########################"
180 echo "UPLOADING DOCS UNDER REVIEW"
181 echo "###########################"
184 gs_base="artifacts.opnfv.org/review"
185 gs_path="$gs_base/$GERRIT_CHANGE_NUMBER"
186 local_path="upload/$GERRIT_CHANGE_NUMBER"
189 mv output "$local_path"
190 gsutil -m cp -r "$local_path" "gs://$gs_base"
192 if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
194 -h "Content-Type:text/html" \
195 -h "Cache-Control:private, max-age=0, no-transform" \
196 "gs://$gs_path"/**.html
199 echo "Document link(s):" >> gerrit_comment.txt
200 find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
201 sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
204 name: upload-generated-docs-to-opnfv-artifacts
209 export PATH=$PATH:/usr/local/bin/
214 echo "########################"
215 echo "UPLOADING GENERATED DOCS"
216 echo "########################"
219 gs_path="$GS_URL/docs"
220 local_path="upload/docs"
223 mv output "$local_path"
224 gsutil -m cp -r "$local_path" "gs://$GS_URL"
226 if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
228 -h "Content-Type:text/html" \
229 -h "Cache-Control:private, max-age=0, no-transform" \
230 "gs://$gs_path"/**.html
233 echo "Document link(s):" >> gerrit_comment.txt
234 find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
235 sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
238 name: report-docs-build-result-to-gerrit
242 export PATH=$PATH:/usr/local/bin/
243 if [[ -e gerrit_comment.txt ]] ; then
245 echo "posting review comment to gerrit..."
247 cat gerrit_comment.txt
249 ssh -p 29418 gerrit.opnfv.org \
250 "gerrit review -p $GERRIT_PROJECT \
251 -m '$(cat gerrit_comment.txt)' \
252 $GERRIT_PATCHSET_REVISION"
256 name: remove-old-docs-from-opnfv-artifacts
260 export PATH=$PATH:/usr/local/bin/
262 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
264 gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
266 if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then
268 echo "Deleting Out-of-dated Documents..."
269 gsutil -m rm -r "gs://$gs_path"
273 name: upload-review-docs
275 - build-html-and-pdf-docs-output
276 - upload-under-review-docs-to-opnfv-artifacts
277 - report-docs-build-result-to-gerrit
280 name: upload-merged-docs
282 - build-html-and-pdf-docs-output
283 - upload-generated-docs-to-opnfv-artifacts
284 - report-docs-build-result-to-gerrit
285 - remove-old-docs-from-opnfv-artifacts