2 # Template used for running CLM scans
4 # {name} - Project Shortname
5 # {project} - Fully qualified project name
6 # {mvn-settings} - Project maven settings file
9 name: '{project-name}-clm-{stream}'
11 project-type: freestyle
16 daysToKeep: '{build-days-to-keep}'
17 numToKeep: '{build-num-to-keep}'
20 - opendaylight-infra-parameters:
23 refspec: 'refs/heads/{branch}'
24 artifacts: '{archive-artifacts}'
32 - opendaylight-infra-wrappers:
33 build-timeout: '{build-timeout}'
39 - provide-maven-settings:
40 global-settings-file: 'odl-global-settings'
41 settings-file: '{mvn-settings}'
43 maven-version: '{mvn33}'
45 goals: 'clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
47 - '-Xmx4096m -XX:MaxPermSize=512m'
48 settings: '{mvn-settings}'
50 global-settings: 'odl-global-settings'
51 global-settings-type: cfp
52 - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
54 application-name: '{project-name}'
58 email-prefix: '[{project-name}]'
59 - opendaylight-infra-shiplogs:
60 maven-version: '{mvn33}'
63 name: '{project-name}-distribution-{stream}'
66 # stream: release stream (eg. stable-lithium or beryllium)
67 # branch: git branch (eg. stable/lithium or master)
69 # Need to keep jobs that deploy to Nexus at end of build as Maven
70 # projects. Maybe reconsider this once upstream moves deploy to a
72 # https://issues.apache.org/jira/browse/MNG-5666
78 daysToKeep: '{build-days-to-keep}'
79 numToKeep: '{build-num-to-keep}'
80 artifactDaysToKeep: '{build-artifact-days-to-keep}'
81 artifactNumToKeep: '{build-artifact-num-to-keep}'
84 - opendaylight-infra-parameters:
85 project: 'integration/distribution'
87 refspec: 'refs/heads/{branch}'
88 artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
96 - opendaylight-infra-wrappers:
97 build-timeout: '{build-timeout}'
101 jobs: '{project}-merge-{stream}'
105 - provide-maven-settings:
106 global-settings-file: 'odl-global-settings'
107 settings-file: '{mvn-settings}'
110 maven-name: '{mvn33}'
112 goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
113 maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
114 settings: 'integration-distribution-settings'
116 global-settings: 'odl-global-settings'
117 global-settings-type: cfp
120 - email-notification:
121 email-prefix: '[{project}]'
125 deploy-unstable: false
126 - opendaylight-infra-shiplogs:
127 maven-version: '{mvn33}'
130 # Template: {project-name}-distribution-check-{stream}
131 # Goal: Build a patch and make sure the distribution can deploy with this change
132 # Operation: This job template builds a patch, creates a distribution containing
133 # the patch, and triggers the distribution deploy test
135 name: '{project-name}-distribution-check-{stream}'
136 disabled: '{obj:disable_distribution_check}'
138 project-type: freestyle
144 daysToKeep: '{build-days-to-keep}'
145 numToKeep: '{build-num-to-keep}'
146 artifactDaysToKeep: '{build-artifact-days-to-keep}'
147 artifactNumToKeep: '{build-artifact-num-to-keep}'
150 - opendaylight-infra-parameters:
153 refspec: 'refs/heads/{branch}'
154 artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
155 - integration-distribution-git-url
158 - integration-gerrit-scm:
159 basedir: '$GERRIT_PROJECT'
160 refspec: '$GERRIT_REFSPEC'
162 - integration-distribution-scm:
166 - opendaylight-infra-wrappers:
167 build-timeout: '{build-timeout}'
171 server-name: 'OpenDaylight'
173 - patchset-created-event:
174 exclude-drafts: 'true'
175 exclude-trivial-rebase: 'false'
176 exclude-no-code-change: 'true'
177 - draft-published-event
178 - comment-added-contains-event:
179 comment-contains-value: 'test-distribution'
180 - comment-added-contains-event:
181 comment-contains-value: 'reverify'
182 - comment-added-contains-event:
183 comment-contains-value: 'recheck'
185 - project-compare-type: 'ANT'
186 project-pattern: '{project}'
188 - branch-compare-type: 'ANT'
189 branch-pattern: '**/{branch}'
197 # This step is to cache artifacts needed to build distribution. "fr" stands for "fake remote".
198 # Running SingleFeaturesTest here does not seem to be required.
200 maven-version: '{mvn33}'
201 pom: 'distribution/pom.xml'
202 goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/fr -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/fr'
204 - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
205 settings: '{mvn-settings}'
207 global-settings: 'odl-global-settings'
208 global-settings-type: cfp
209 # Now delete artifacts related to $GERRIT_PROJECT. To be safe, delete {project-name} location as well.
211 rm -rfv /tmp/fr/org/opendaylight/$GERRIT_PROJECT
212 rm -rfv /tmp/fr/org/opendaylight/{project-name}
213 # Now build project in really local repository /tmp/r/ and deploy to /tmp/fr/.
214 # We could copy some artifacts from /tmp/fr/ to /tmp/r/,
215 # but that would hide errors of missing POM dependency references.
216 # Ordinary SingleFeatureTest failures are detected in verify job, so we can use "q" profile here.
218 maven-version: '{mvn33}'
219 pom: '$GERRIT_PROJECT/pom.xml'
220 goals: 'clean deploy dependency:tree -DoutputFile=dependency_tree.txt -V -B -Pq -DaltDeploymentRepository=fake-remote::default::file:///tmp/fr/ -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
222 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
223 settings: '{mvn-settings}'
225 global-settings: 'odl-global-settings'
226 global-settings-type: cfp
227 # Now wipe the local repository.
230 # Now the ugly part. It seems that the only way to tell Maven 2+
231 # which remote repositories to use is via settings.xml file.
232 # So we create such file here.
236 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
237 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
238 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
239 https://maven.apache.org/xsd/settings-1.0.0.xsd">
247 <url>file:///tmp/fr/</url>
256 <url>file:///tmp/fr/</url>
260 </pluginRepositories>
265 # Finally, repeat the distribution build but with the new settings.
266 # We cannot use --offline, because: "Cannot access file (file:///tmp/fr) in offline mode"
267 # This final build step not only detects when important project artifacts are not deployed,
268 # but also when they are deployed and just POM dependency reference for them is missing.
269 # For that, not only distribution-karaf is to be built, but also features, and without skipping SingleFeatureTest.
271 maven-version: '{mvn33}'
272 pom: 'distribution/pom.xml'
273 goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt -s fake_remotes.xml -V -B -Pq,file -DskipTests=false -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
275 - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
276 - integration-distribution-check
279 - email-notification:
280 email-prefix: '[{project-name}]'
285 mkdir -p $WORKSPACE/archives
286 cp karaf*.log $WORKSPACE/archives
287 script-only-if-succeeded: False
288 script-only-if-failed: False
289 mark-unstable-if-failed: True
292 - opendaylight-infra-shiplogs:
293 maven-version: '{mvn33}'
296 name: '{project-name}-integration-{stream}'
298 # Job template for ODL integration verify jobs
300 # This is similar to a normal verify job, but it runs
301 # when a project that's a dependency of your project
302 # is successfully built.
304 # Required Variables:
305 # stream: release stream (eg. stable-lithium or beryllium)
306 # branch: git branch (eg. stable/lithium or master)
308 project-type: freestyle
313 daysToKeep: '{build-days-to-keep}'
314 numToKeep: '{build-num-to-keep}'
315 artifactDaysToKeep: '{build-artifact-days-to-keep}'
316 artifactNumToKeep: '{build-artifact-num-to-keep}'
319 - opendaylight-infra-parameters:
322 refspec: 'refs/heads/{branch}'
323 artifacts: '{archive-artifacts}'
331 - opendaylight-infra-wrappers:
332 build-timeout: '{build-timeout}'
336 jobs: '{dependencies}'
340 - jacoco-nojava-workaround
341 - provide-maven-settings:
342 global-settings-file: 'odl-global-settings'
343 settings-file: '{mvn-settings}'
345 maven-version: '{mvn33}'
346 goals: '{mvn-goals} -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
349 settings: '{mvn-settings}'
351 global-settings: 'odl-global-settings'
352 global-settings-type: cfp
355 - email-notification:
356 email-prefix: '{email-upstream}'
359 - opendaylight-infra-shiplogs:
360 maven-version: '{mvn33}'
363 name: '{project-name}-merge-{stream}'
365 # Job template for ODL merge jobs
367 # The purpose of this job template is to setup a ODL merge job
368 # and deploy artifacts to Nexus.
370 # Required Variables:
371 # stream: release stream (eg. stable-lithium or beryllium)
372 # branch: git branch (eg. stable/lithium or master)
374 # Need to keep jobs that deploy to Nexus at end of build as Maven
375 # projects. Maybe reconsider this once upstream moves deploy to a
376 # separate lifecycle:
377 # https://issues.apache.org/jira/browse/MNG-5666
385 artifactDaysToKeep: '{build-artifact-days-to-keep}'
386 artifactNumToKeep: '{build-artifact-num-to-keep}'
389 - opendaylight-infra-parameters:
392 refspec: 'refs/heads/{branch}'
393 artifacts: '{archive-artifacts}'
396 - gerrit-trigger-scm:
398 choosing-strategy: 'default'
401 - opendaylight-infra-wrappers:
402 build-timeout: '{build-timeout}'
406 - gerrit-trigger-patch-merged:
411 - jacoco-nojava-workaround
412 - provide-maven-settings:
413 global-settings-file: 'odl-global-settings'
414 settings-file: '{mvn-settings}'
416 # TODO: Do we want to apply sophisticated checks as in *-distribution-check-*?
418 maven-name: '{mvn33}'
419 goals: '{mvn-goals} -V -B -Djenkins -Dmerge -Dstream={stream} -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
420 maven-opts: '{mvn-opts}'
421 settings: '{mvn-settings}'
423 global-settings: 'odl-global-settings'
424 global-settings-type: cfp
425 post-step-run-condition: UNSTABLE
429 condition-kind: file-exists
430 condition-filename: deploy-site.xml
431 condition-basedir: workspace
433 # The strategy here is intentional to run Maven site:deploy twice
434 # once using regular pom.xml to produce a staged-site which is
435 # then used by deploy-site.xml to push to Nexus. This is a
436 # workaround to Maven Site's default linking code which creates
437 # incorrect URLs for sites due to auto-detection assuming your
438 # project is configured in a certain way which ODL is not.
441 maven-version: '{mvn33}'
443 goals: 'site:deploy -V -B -Dstream={stream}'
446 settings: '{mvn-settings}'
448 global-settings: 'odl-global-settings'
449 global-settings-type: cfp
451 maven-version: '{mvn33}'
453 goals: 'site:deploy -V -B -Dstream={stream}'
456 settings: '{mvn-settings}'
458 global-settings: 'odl-global-settings'
459 global-settings-type: cfp
465 - email-notification:
466 email-prefix: '[{project-name}]'
470 deploy-unstable: false
472 - opendaylight-infra-shiplogs:
473 maven-version: '{mvn33}'
476 name: '{project-name}-periodic-{stream}'
478 # Job template for periodic builders
480 # The purpose of this job template is to setup a periodic
483 # Required Variables:
484 # stream: release stream (eg. stable-lithium or beryllium)
485 # branch: git branch (eg. stable/lithium or master)
487 project-type: freestyle
495 - opendaylight-infra-parameters:
498 refspec: 'refs/heads/{branch}'
499 artifacts: '{archive-artifacts}'
507 - opendaylight-infra-wrappers:
508 build-timeout: '{build-timeout}'
514 - jacoco-nojava-workaround
515 - provide-maven-settings:
516 global-settings-file: 'odl-global-settings'
517 settings-file: '{mvn-settings}'
519 maven-version: '{mvn33}'
520 goals: '{mvn-goals} -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
523 settings: '{mvn-settings}'
525 global-settings: 'odl-global-settings'
526 global-settings-type: cfp
529 - email-notification:
530 email-prefix: '[{project-name}]'
533 - opendaylight-infra-shiplogs:
534 maven-version: '{mvn33}'
537 name: '{project-name}-sonar'
540 project-type: freestyle
547 artifactDaysToKeep: '1'
548 artifactNumToKeep: '1'
551 - opendaylight-infra-parameters:
554 refspec: 'refs/heads/{branch}'
555 artifacts: '{archive-artifacts}'
563 - opendaylight-infra-wrappers:
564 build-timeout: '{build-timeout}'
568 - gerrit-trigger-patch-sonar:
572 - jacoco-nojava-workaround
573 - provide-maven-settings:
574 global-settings-file: 'odl-global-settings'
575 settings-file: '{mvn-settings}'
577 maven-version: '{mvn33}'
578 goals: '{mvn-goals} -V -B -Djenkins -Dsonar -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
581 settings: '{mvn-settings}'
583 global-settings: 'odl-global-settings'
584 global-settings-type: cfp
586 maven-version: '{mvn33}'
587 # We should switch to the recommended configuration of sonar once
588 # JJB adds support for configurating the Sonar wrapper:
589 # http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
590 goals: 'sonar:sonar -V -B -Djenkins -Dsonar -Dsonar.host.url=https://sonar.opendaylight.org -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
593 settings: '{mvn-settings}'
595 global-settings: 'odl-global-settings'
596 global-settings-type: cfp
599 - email-notification:
600 email-prefix: '[{project-name}]'
603 - opendaylight-infra-shiplogs:
604 maven-version: '{mvn33}'
607 name: '{project-name}-validate-autorelease-{stream}'
608 disabled: '{obj:disable_autorelease}'
610 project-type: freestyle
619 - opendaylight-infra-parameters:
622 refspec: 'refs/heads/{branch}'
623 artifacts: '{archive-artifacts}'
624 - autorelease-release-tag:
625 release-tag: 'validate'
626 - autorelease-release-branch:
627 release-branch: '{branch}'
630 default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/releng/autorelease'
631 description: "Autorelease clone URL"
636 credentials-id: 'opendaylight-jenkins-ssh'
646 - opendaylight-infra-wrappers:
647 build-timeout: '{build-timeout}'
651 server-name: 'OpenDaylight'
653 - patchset-created-event:
654 exclude-drafts: 'true'
655 exclude-trivial-rebase: 'false'
656 exclude-no-code-change: 'true'
657 - draft-published-event
658 - comment-added-contains-event:
659 comment-contains-value: 'recheck'
660 - comment-added-contains-event:
661 comment-contains-value: 'reverify'
662 - comment-added-contains-event:
663 comment-contains-value: 'revalidate'
665 - project-compare-type: 'ANT'
666 project-pattern: '{project}'
668 - branch-compare-type: 'ANT'
669 branch-pattern: '**/{branch}'
675 - jacoco-nojava-workaround
676 - autorelease-checkout-gerrit-patch
677 - autorelease-generate-release-patches
679 maven-version: '{mvn33}'
680 pom: validate-pom.xml
681 goals: 'clean install dependency:tree -V -B -T1.5C -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
684 settings: 'autorelease-settings'
686 global-settings: 'odl-global-settings'
687 global-settings-type: cfp
689 maven-version: '{mvn33}'
691 goals: 'clean validate -V -B -Pq -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
693 - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
694 settings: 'autorelease-settings'
696 global-settings: 'odl-global-settings'
697 global-settings-type: cfp
698 - autorelease-sys-stats
701 - email-notification:
702 email-prefix: '[autorelease] [{project-name}]'
703 - opendaylight-infra-shiplogs:
704 maven-version: '{mvn33}'
707 name: '{project-name}-verify-{stream}-{maven}-{jdks}'
709 # Job template for ODL verify jobs
711 # The purpose of this job template is to setup a ODL verify job
713 # Required Variables:
714 # stream: release stream (eg. stable-lithium or beryllium)
715 # branch: git branch (eg. stable/lithium or master)
717 project-type: freestyle
726 - opendaylight-infra-parameters:
729 refspec: 'refs/heads/{branch}'
730 artifacts: '{archive-artifacts}'
733 - gerrit-trigger-scm:
734 refspec: '$GERRIT_REFSPEC'
735 choosing-strategy: 'gerrit'
738 - opendaylight-infra-wrappers:
739 build-timeout: '{build-timeout}'
742 - gerrit-trigger-patch-submitted:
747 - jacoco-nojava-workaround
748 - provide-maven-settings:
749 global-settings-file: 'odl-global-settings'
750 settings-file: '{mvn-settings}'
752 maven-version: '{mvn-version}'
753 goals: '{mvn-goals} -V -B -Djenkins -Dstream={stream} -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
756 settings: '{mvn-settings}'
758 global-settings: 'odl-global-settings'
759 global-settings-type: cfp
763 - email-notification:
764 email-prefix: '[{project-name}]'
766 - opendaylight-infra-shiplogs:
767 maven-version: '{mvn-version}'