+---
# Autorelease build jobs
-
- job-template:
name: 'autorelease-release-{stream}'
+ ############
+ # Defaults #
+ ############
+
+ build-node: centos7-autorelease-8c-16g
+ java-version: openjdk8
+ mvn-version: mvn33
+ extra-mvn-opts: ''
+
+ #####################
+ # Job Configuration #
+ #####################
+
project-type: freestyle
- node: centos7-autorelease-4c-16g
- jdk: '{jdk}'
+ node: '{build-node}'
+ jdk: '{java-version}'
+ cron: 'H 0 * * *'
properties:
- - opendaylight-infra-properties:
- build-days-to-keep: '30'
+ - lf-infra-properties:
+ build-days-to-keep: 30
parameters:
- - maven-exec:
- maven-version: 'mvn33'
- - opendaylight-infra-parameters:
- project: '{project}'
- branch: '{branch}'
- refspec: 'refs/heads/{branch}'
- artifacts: '{archive-artifacts}'
- - autorelease-release-tag:
- release-tag: '{next-release-tag}'
- - autorelease-release-branch:
- release-branch: '{branch}'
+ - maven-exec:
+ maven-version: 'mvn33'
+ - lf-infra-parameters:
+ project: '{project}'
+ stream: '{stream}'
+ branch: '{branch}'
+ lftools-version: '{lftools-version}'
+ - distribution-karaf-version:
+ karaf-version: '{karaf-version}'
+ - autorelease-release-tag:
+ release-tag: '{next-release-tag}'
+ - string:
+ name: EXTRA_MVN_OPTS
+ default: '{extra-mvn-opts}'
+ description: |
+ Additional optional Maven Options to pass to the Maven Goals
+ parameter.
+
+ Examples:
+ -Dskip.karaf.featureTest=true # To disable karaf SingleFeatureTests
+ --fail-never # NEVER fail the build, regardless of project result
+ --fail-at-end # Only fail the build afterwards; allow all non-impacted builds to continue
+ - string:
+ name: ARCHIVE_ARTIFACTS
+ default: '{archive-artifacts}'
+ description: Artifacts to archive to the logs server.
scm:
- - git:
- credentials-id: 'opendaylight-jenkins-ssh'
- url: '$GIT_BASE'
- refspec: '$GERRIT_REFSPEC'
- branches:
- - '$GERRIT_BRANCH'
- choosing-strategy: 'gerrit'
- skip-tag: true
- submodule:
- recursive: true
- timeout: 60
+ - git:
+ credentials-id: 'opendaylight-jenkins-ssh'
+ url: '$GIT_BASE'
+ refspec: '$GERRIT_REFSPEC'
+ branches:
+ - '$GERRIT_BRANCH'
+ choosing-strategy: default
+ skip-tag: true
+ submodule:
+ recursive: true
+ timeout: 60
wrappers:
- - opendaylight-infra-wrappers:
- build-timeout: '1440'
+ - opendaylight-infra-wrappers:
+ build-timeout: '900'
triggers:
- - timed: 'H 0 * * *'
+ - timed: '{cron}'
builders:
- # force jenkins install of maven version before any shell scripts use it
- - maven-target:
- maven-version: 'mvn33'
- goals: '-version'
- settings: 'autorelease-settings'
- settings-type: cfp
- global-settings: 'odl-global-settings'
- global-settings-type: cfp
- - wipe-local-maven-repo
- - jacoco-nojava-workaround
- - shell: "./scripts/list-project-dependencies.sh"
- - autorelease-determine-merge-order
- - autorelease-cfp:
- autorelease-settings: 'autorelease-settings'
- odl-global-settings: 'odl-global-settings'
- - autorelease-generate-taglist
- - autorelease-distribute-taglist
- - distribute-build-url:
- path: 'integration/distribution/distribution-karaf/src/main/assembly'
- - autorelease-generate-release-patches
- # In a perfect world projects should be releasing separately and we consume them
- # via a project that pulls the release bits from each project from Nexus.
- # Keep the patches compatible with that ideal, but apply an edit
- # to enable building in a single maven reactor afterwards.
- - autorelease-fix-relative-paths
- - maven-target:
- maven-version: 'mvn33'
- pom: 'pom.xml'
- goals: 'clean deploy -V -B -Pintegrationtests,docs,repoBuild -Djenkins -Dcheckstyle.skip=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage'
- java-opts:
- - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
- settings: 'autorelease-settings'
- settings-type: cfp
- global-settings: 'odl-global-settings'
- global-settings-type: cfp
- - autorelease-maven-deploy
- - autorelease-get-integration-test-variables
- - autorelease-maven-sources:
- maven-version: 'mvn33'
- settings: 'autorelease-settings'
- global-settings: 'odl-global-settings'
- - autorelease-maven-sources-post-process
- - autorelease-sys-stats
- - shell: |
- mkdir -p archives/
- cp *.log *.prop $_
+ # force jenkins install of maven version before any shell scripts use it
+ - lf-maven-install:
+ mvn-version: '{mvn-version}'
+ - wipe-local-maven-repo
+ - jacoco-nojava-workaround
+ - shell: "./scripts/list-project-dependencies.sh"
+ - autorelease-determine-merge-order
+ - autorelease-cfp:
+ autorelease-settings: 'autorelease-settings'
+ global-settings: 'odl-global-settings'
+ - autorelease-generate-release-patches
+ - autorelease-generate-artifact-versions
+ - autorelease-distribute-taglist
+ - distribute-build-url:
+ path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
+ # In a perfect world projects should be releasing separately and we consume them
+ # via a project that pulls the release bits from each project from Nexus.
+ # Keep the patches compatible with that ideal, but apply an edit
+ # to enable building in a single maven reactor afterwards.
+ - autorelease-fix-relative-paths
+ - maven-target:
+ maven-version: 'mvn33'
+ pom: 'pom.xml'
+ goals: |
+ clean deploy
+ $EXTRA_MVN_OPTS
+ -Pintegrationtests,docs,repoBuild
+ -Dcheckstyle.skip=true
+ -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
+ {opendaylight-infra-mvn-opts}
+ java-opts:
+ - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+ settings: 'autorelease-settings'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+ - autorelease-maven-deploy
+ - autorelease-get-integration-test-variables
+ - autorelease-maven-sources:
+ opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
+ maven-version: 'mvn33'
+ settings: 'autorelease-settings'
+ global-settings: 'global-settings'
+ - autorelease-maven-sources-post-process
+ - shell: |
+ mkdir -p archives/
+ cp *.log *.prop $_
publishers:
- - email-notification:
- email-recipients: '{email-recipients}'
- email-prefix: '[autorelease]'
- - trigger-parameterized-builds:
- - project: 'integration-distribution-test-{integration-test}'
- condition: UNSTABLE_OR_BETTER
- property-file: variables.jenkins-trigger
- fail-on-missing: true
- - opendaylight-infra-shiplogs:
- maven-version: 'mvn33'
+ - opendaylight-infra-notify-status
+ - trigger-parameterized-builds:
+ - project: 'integration-distribution-test-{integration-test}'
+ condition: UNSTABLE_OR_BETTER
+ property-file: variables.jenkins-trigger
+ fail-on-missing: true
+ - project: 'integration-distribution-test-{integration-test}'
+ condition: FAILED
+ trigger-with-no-params: true
+ - project: 'integration-sanity-test-{integration-test}'
+ condition: UNSTABLE_OR_BETTER
+ property-file: variables.jenkins-trigger
+ fail-on-missing: true
+ - project: 'integration-sanity-test-{integration-test}'
+ condition: FAILED
+ trigger-with-no-params: true
+ - project: 'packaging-build-rpm-{stream}'
+ condition: UNSTABLE_OR_BETTER
+ predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
+ property-file: variables.jenkins-trigger
+ fail-on-missing: true
+ - project: 'packaging-build-deb-{stream}'
+ condition: UNSTABLE_OR_BETTER
+ predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
+ property-file: variables.jenkins-trigger
+ fail-on-missing: true
+ - lf-infra-publish
- job-template:
- name: 'autorelease-project-report-{stream}'
+ name: autorelease-update-validate-jobs-{stream}
+ project-type: freestyle
+ node: centos7-builder-2c-8g
+
+ properties:
+ - lf-infra-properties:
+ build-days-to-keep: 7
+
+ parameters:
+ - lf-infra-parameters:
+ project: releng/builder
+ branch: '{branch}'
+ stream: '{stream}'
+ lftools-version: '{lftools-version}'
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '$GIT_URL/releng/builder'
+ branch: master
+ refspec: 'refs/heads/master'
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+ submodule-recursive: true
+ choosing-strategy: default
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: remerge$
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: pom.xml
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: 10
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+
+ builders:
+ - autorelease-update-validate-projects
+ - opendaylight-infra-push-gerrit-patch:
+ project: 'releng/builder'
+ gerrit-topic: 'autorelease-update-validate-jobs-{stream}'
+ gerrit-commit-message: |
+ Update validate autorelease projects for {stream}
+
+ publishers:
+ - lf-infra-publish
+
+- job-template:
+ name: autorelease-version-bump-{stream}
+ project-type: freestyle
+ node: centos7-builder-4c-16g
+
+ properties:
+ - opendaylight-infra-properties:
+ build-days-to-keep: 7
+
+ parameters:
+ - lf-infra-parameters:
+ project: releng/autorelease
+ branch: '{branch}'
+ stream: '{stream}'
+ refspec: 'refs/heads/{branch}'
+ lftools-version: '{lftools-version}'
+ - string:
+ name: RELEASE_TAG
+ default: '{next-release-tag}'
+ description: |
+ Release that is being version bumped.
+ Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
+ - bool:
+ name: DRY_RUN
+ default: true
+ description: |
+ If DRY_RUN is enabled modifications are not published to Gerrit.
+ - maven-exec:
+ maven-version: mvn33
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '$GIT_URL/$GERRIT_PROJECT'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+ submodule-recursive: true
+ choosing-strategy: default
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: 480
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+
+ builders:
+ # force jenkins install of maven version before any shell scripts use it
+ - maven-target:
+ maven-version: mvn33
+ goals: '-version'
+ settings: autorelease-settings
+ settings-type: cfp
+ global-settings: global-settings
+ global-settings-type: cfp
+ - autorelease-cfp
+ - shell: !include-raw-escape:
+ - ../global-jjb/shell/lftools-install.sh
+ - version-bump.sh
+
+ publishers:
+ - lf-infra-publish
+
+- job-template:
+ name: 'autorelease-generate-release-notes-{stream}'
+
+ ######################
+ # Default parameters #
+ ######################
+
+ gerrit_merge_triggers:
+ - comment-added-contains-event:
+ comment-contains-value: generate-release-notes .+$
+
+ #####################
+ # Job Configuration #
+ #####################
+
+ project-type: freestyle
+ node: centos7-builder-2c-8g
+
+ properties:
+ - lf-infra-properties:
+ build-days-to-keep: 7
+
+ parameters:
+ - lf-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ stream: '{stream}'
+ lftools-version: '{lftools-version}'
+ - string:
+ name: RELEASE
+ description: Release to generate release notes for.
+
+ scm:
+ - lf-infra-gerrit-scm:
+ git-url: '$GIT_URL/$GERRIT_PROJECT'
+ branch: '$GERRIT_BRANCH'
+ refspec: '$GERRIT_REFSPEC'
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+ submodule-recursive: true
+ choosing-strategy: default
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: 10
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server-name}'
+ trigger-on: '{obj:gerrit_merge_triggers}'
+ projects:
+ - project-compare-type: ANT
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: ANT
+ branch-pattern: '**/{branch}'
+
+ builders:
+ - autorelease-generate-release-notes
+
+ publishers:
+ - lf-infra-publish
+
+- job-template:
+ name: '{project-name}-validate-autorelease-{stream}'
+
+ ############
+ # Defaults #
+ ############
+
+ java-version: openjdk8
+
+ #####################
+ # Job Configuration #
+ #####################
+ disabled: false
project-type: freestyle
- node: centos7-java-builder-2c-8g
+ node: '{build-node}'
+ concurrent: true
+ jdk: '{java-version}'
properties:
- - opendaylight-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
+ - lf-infra-properties:
+ build-days-to-keep: 7
parameters:
- - opendaylight-infra-parameters:
- project: '{project}'
- branch: '{branch}'
- refspec: 'refs/heads/{branch}'
- artifacts: '{archive-artifacts}'
- - string:
- name: REPORT_DIR
- default: '$WORKSPACE/project-reports'
- description: "The directory containing project reports"
+ - lf-infra-parameters:
+ project: '{project}'
+ stream: '{stream}'
+ branch: '{branch}'
+ lftools-version: '{lftools-version}'
+ - autorelease-release-tag:
+ release-tag: validate
+ - string:
+ name: CLONE_URL
+ default: '{git-url}/releng/autorelease'
+ description: "Autorelease clone URL"
scm:
- - git:
- credentials-id: 'opendaylight-jenkins-ssh'
- url: '$GIT_BASE'
- refspec: '$GERRIT_REFSPEC'
- branches:
- - '$GERRIT_BRANCH'
- choosing-strategy: 'gerrit'
- skip-tag: true
- submodule:
- recursive: true
+ - git:
+ url: '$CLONE_URL'
+ credentials-id: 'opendaylight-jenkins-ssh'
+ refspec: ''
+ branches:
+ - 'origin/{branch}'
+ skip-tag: true
+ submodule:
+ recursive: true
+ timeout: 60
wrappers:
- - opendaylight-infra-wrappers:
- build-timeout: '30'
+ - opendaylight-infra-wrappers:
+ build-timeout: '{build-timeout}'
triggers:
- - timed: '0 0 * * 0'
+ - gerrit-trigger-patch-submitted:
+ gerrit-server-name: '{gerrit-server-name}'
+ project: '{project}'
+ branch: '{branch}'
+ files: '**/*.xml'
builders:
- - shell: 'echo "DATE=`date +%Y-%m-%d`" > $WORKSPACE/variables.prop'
- - inject:
- properties-file: variables.prop
- - autorelease-generate-project-report
- - shell: "./scripts/list-project-dependencies.sh"
- - autorelease-determine-merge-order
- - autorelease-sys-stats
+ - autorelease-checkout-gerrit-patch
+ - jacoco-nojava-workaround
+ - shell: "./scripts/list-project-dependencies.sh"
+ - autorelease-determine-merge-order
+ - autorelease-generate-release-patches
+ # In a perfect world projects should be releasing separately and we consume them
+ # via a project that pulls the release bits from each project from Nexus.
+ # Keep the patches compatible with that ideal, but apply an edit
+ # to enable building in a single maven reactor afterwards.
+ - autorelease-fix-relative-paths
+ - maven-target:
+ maven-version: mvn33
+ pom: validate-pom.xml
+ goals: |
+ clean install dependency:tree
+ -T1.5C
+ -Pq
+ {opendaylight-infra-mvn-opts}
+ java-opts:
+ - '-Xmx8g'
+ settings: autorelease-settings
+ settings-type: cfp
+ global-settings: global-settings
+ global-settings-type: cfp
+ # Hack to workaround the duplicate-finder plugin in odlparent breaking validate-autorelease
+ - shell: sed -i 's/validate/none/' /tmp/r/org/opendaylight/odlparent/odlparent/3.0.2/odlparent-3.0.2.pom
+ - maven-target:
+ maven-version: mvn33
+ pom: pom.xml
+ goals: |
+ clean validate
+ -Pq
+ {opendaylight-infra-mvn-opts}
+ java-opts:
+ - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+ settings: autorelease-settings
+ settings-type: cfp
+ global-settings: global-settings
+ global-settings-type: cfp
+ - shell: |
+ mkdir -p archives/
+ cp *.log $_
publishers:
- - email-ext:
- attachments: 'project-reports/*.log'
- recipients: 'skitt@redhat.com thanh.ha@linuxfoundation.org'
- reply-to: dev@lists.opendaylight.org
- content-type: default
- subject: '[releng] ODL {stream} project report for ${{ENV, var="DATE"}}'
- body: |
- This is a project report generated on $DATE listing the commit
- history of ODL projects for the past week. See attached
- git-report.log
- Archive also available on Jenkins at $BUILD_URL
- always: true
- - opendaylight-infra-shiplogs:
- maven-version: 'mvn33'
+ - email-notification:
+ email-recipients: '{email-recipients}'
+ email-prefix: '[autorelease] [{project-name}]'
+ - lf-infra-publish