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: 'brahmaputra-trigger-daily-disabled'
65 name: 'brahmaputra-trigger-daily-enabled'
70 name: gerrit-trigger-patch-submitted
73 server-name: 'gerrit.opnfv.org'
75 - patchset-created-event:
76 exclude-drafts: 'false'
77 exclude-trivial-rebase: 'false'
78 exclude-no-code-change: 'false'
79 - draft-published-event
80 - comment-added-contains-event:
81 comment-contains-value: 'recheck'
83 - project-compare-type: 'ANT'
84 project-pattern: '{name}'
86 - branch-compare-type: 'ANT'
87 branch-pattern: '**/{branch}'
90 name: gerrit-trigger-patch-merged
93 server-name: 'gerrit.opnfv.org'
96 - comment-added-contains-event:
97 comment-contains-value: 'remerge'
99 - project-compare-type: 'ANT'
100 project-pattern: '{name}'
102 - branch-compare-type: 'ANT'
103 branch-pattern: '**/{branch}'
106 name: archive-artifacts
109 artifacts: '{artifacts}'
115 name: email-notification
118 recipients: 'jenkins@lists.opnfv.org'
120 content-type: default
121 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
123 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
125 Check console output at $BUILD_URL to view the results.
136 exec-pattern: "**/**.exec"
137 class-pattern: "**/classes"
138 source-pattern: "**/src/main/java"
139 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**"
153 - shell: 'echo testing macro "test-macro"'
156 name: wipe-org-opendaylight-repo
158 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
161 name: jacoco-nojava-workaround
163 - shell: 'mkdir -p $WORKSPACE/target/classes'
169 name: build-html-and-pdf-docs-output
175 export PATH=$PATH:/usr/local/bin/
176 git clone ssh://gerrit.opnfv.org:29418/releng
177 GERRIT_COMMENT=gerrit_comment.txt ./releng/utils/docs-build.sh
180 name: upload-under-review-docs-to-opnfv-artifacts
187 export PATH=$PATH:/usr/local/bin/
189 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
190 [[ -d docs_output ]] || exit 0
193 echo "###########################"
194 echo "UPLOADING DOCS UNDER REVIEW"
195 echo "###########################"
198 gs_base="artifacts.opnfv.org/review"
199 gs_path="$gs_base/$GERRIT_CHANGE_NUMBER"
200 local_path="upload/$GERRIT_CHANGE_NUMBER"
203 mv docs_output "$local_path"
204 gsutil -m cp -r "$local_path" "gs://$gs_base"
206 if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
208 -h "Content-Type:text/html" \
209 -h "Cache-Control:private, max-age=0, no-transform" \
210 "gs://$gs_path"/**.html
213 echo "Document link(s):" >> gerrit_comment.txt
214 find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
215 sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
218 name: upload-generated-docs-to-opnfv-artifacts
225 export PATH=$PATH:/usr/local/bin/
227 [[ -d docs_output ]] || exit 0
230 echo "########################"
231 echo "UPLOADING GENERATED DOCS"
232 echo "########################"
235 gs_path="$GS_URL/docs"
236 local_path="upload/docs"
239 mv docs_output "$local_path"
240 gsutil -m cp -r "$local_path" "gs://$GS_URL"
242 if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
244 -h "Content-Type:text/html" \
245 -h "Cache-Control:private, max-age=0, no-transform" \
246 "gs://$gs_path"/**.html
249 echo "Document link(s):" >> gerrit_comment.txt
250 find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
251 sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt
254 name: report-docs-build-result-to-gerrit
261 export PATH=$PATH:/usr/local/bin/
262 if [[ -e gerrit_comment.txt ]] ; then
264 echo "posting review comment to gerrit..."
266 cat gerrit_comment.txt
268 ssh -p 29418 gerrit.opnfv.org \
269 "gerrit review -p $GERRIT_PROJECT \
270 -m '$(cat gerrit_comment.txt)' \
271 $GERRIT_PATCHSET_REVISION"
275 name: remove-old-docs-from-opnfv-artifacts
282 export PATH=$PATH:/usr/local/bin/
284 [[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
286 gs_path="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
288 if gsutil ls "gs://$gs_path" > /dev/null 2>&1 ; then
290 echo "Deleting Out-of-dated Documents..."
291 gsutil -m rm -r "gs://$gs_path"
295 name: upload-review-docs
297 - build-html-and-pdf-docs-output
298 - upload-under-review-docs-to-opnfv-artifacts
299 - report-docs-build-result-to-gerrit
302 name: upload-merged-docs
304 - build-html-and-pdf-docs-output
305 - upload-generated-docs-to-opnfv-artifacts
306 - report-docs-build-result-to-gerrit
307 - remove-old-docs-from-opnfv-artifacts