X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fautorelease-templates.yaml;h=d1e3ec70601c75bfb0e6ddfe46fa82e2dc78198c;hb=8d2f7df3cdb581f4d69c6617177d40537ab9fb0b;hp=d46ff5d96e084e47e6a24a4b35269856ac908533;hpb=fc441b2b3f644271eef0b5f8807f6294b702ec9e;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/autorelease-templates.yaml b/jjb/autorelease/autorelease-templates.yaml index d46ff5d96..d1e3ec706 100644 --- a/jjb/autorelease/autorelease-templates.yaml +++ b/jjb/autorelease/autorelease-templates.yaml @@ -9,27 +9,24 @@ cron: 'H 0 * * *' # Default variable values + mvn-version: mvn33 extra-mvn-opts: '' 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: - os-cloud: '{os-cloud}' + - lf-infra-parameters: project: '{project}' + stream: '{stream}' branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' - distribution-karaf-version: karaf-version: '{karaf-version}' - autorelease-release-tag: release-tag: '{next-release-tag}' - - autorelease-release-branch: - release-branch: '{branch}' - string: name: EXTRA_MVN_OPTS default: '{extra-mvn-opts}' @@ -41,6 +38,16 @@ -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. + - bool: + name: TRIGGER_DOWNSTREAM_JOBS + default: true + description: | + Used by the post-build-script step to determine if downstream + jobs should be triggered for this run or not. scm: - git: @@ -49,7 +56,7 @@ refspec: '$GERRIT_REFSPEC' branches: - '$GERRIT_BRANCH' - choosing-strategy: 'gerrit' + choosing-strategy: default skip-tag: true submodule: recursive: true @@ -64,25 +71,19 @@ 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 + - 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' - odl-global-settings: 'odl-global-settings' - - autorelease-generate-taglist + global-settings: 'odl-global-settings' + - autorelease-generate-release-patches - autorelease-distribute-taglist - distribute-build-url: path: 'integration/distribution/$KARAF_ARTIFACT/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 @@ -102,7 +103,7 @@ - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' settings: 'autorelease-settings' settings-type: cfp - global-settings: 'odl-global-settings' + global-settings: 'global-settings' global-settings-type: cfp - autorelease-maven-deploy - autorelease-get-integration-test-variables @@ -110,7 +111,7 @@ opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}' maven-version: 'mvn33' settings: 'autorelease-settings' - global-settings: 'odl-global-settings' + global-settings: 'global-settings' - autorelease-maven-sources-post-process - shell: | mkdir -p archives/ @@ -118,36 +119,97 @@ publishers: - opendaylight-infra-notify-status - - opendaylight-infra-sysstats - - archive: - # Need to archive dependencies.log in Jenkins to provide a simple - # way for downstream jobs to pull the latest version of this file - # in their builds. - artifacts: 'dependencies.log' - - trigger-parameterized-builds: - - project: 'autorelease-generate-release-notes-{stream}' - condition: UNSTABLE_OR_BETTER - property-file: variables.jenkins-trigger - fail-on-missing: true - - 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-master' - condition: UNSTABLE_OR_BETTER - predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL - property-file: variables.jenkins-trigger - fail-on-missing: true + - postbuildscript: + builders: + - conditional-step: + condition-kind: boolean-expression + condition-expression: $TRIGGER_DOWNSTREAM_JOBS + steps: + - trigger-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 + script-only-if-succeeded: false + script-only-if-failed: false + - lf-infra-publish + +- job-template: + name: autorelease-update-validate-jobs-{stream} + project-type: freestyle + node: centos7-java-builder-2c-4g + + properties: + - lf-infra-properties: + build-days-to-keep: 7 + + parameters: + - lf-infra-parameters: + project: releng/builder + branch: '{branch}' + stream: '{stream}' + + 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: + - shell: !include-raw-escape: + - update-validate-autorelease-projects.sh + - 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: @@ -163,6 +225,7 @@ - lf-infra-parameters: project: releng/autorelease branch: '{branch}' + stream: '{stream}' refspec: 'refs/heads/{branch}' - string: name: RELEASE_TAG @@ -180,6 +243,7 @@ scm: - lf-infra-gerrit-scm: + git-url: '$GIT_URL/$GERRIT_PROJECT' branch: '{branch}' refspec: 'refs/heads/{branch}' jenkins-ssh-credential: opendaylight-jenkins-ssh @@ -198,7 +262,7 @@ goals: '-version' settings: autorelease-settings settings-type: cfp - global-settings: odl-global-settings + global-settings: global-settings global-settings-type: cfp - autorelease-cfp - shell: !include-raw-escape: @@ -206,70 +270,150 @@ - version-bump.sh publishers: + - trigger-parameterized-builds: + - project: 'autorelease-generate-release-notes-{stream}' + condition: UNSTABLE_OR_BETTER + trigger-with-no-params: true - lf-infra-publish - job-template: name: 'autorelease-generate-release-notes-{stream}' project-type: freestyle - node: centos7-java-builder-2c-8g + node: centos7-java-builder-2c-4g properties: - - opendaylight-infra-properties: - build-days-to-keep: '{build-days-to-keep}' + - lf-infra-properties: + build-days-to-keep: 7 parameters: - - opendaylight-infra-parameters: - os-cloud: '{os-cloud}' + - lf-infra-parameters: project: '{project}' branch: '{branch}' + stream: '{stream}' + + scm: + - lf-infra-gerrit-scm: + git-url: '$GIT_URL/$GERRIT_PROJECT' + branch: '{branch}' refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' + 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: + - timed: '0 0 * * 0' + + builders: + - lf-maven-install: + mvn-version: mvn33 + - maven-target: + maven-version: mvn33 + pom: '$WORKSPACE/scripts/release_notes_management/pom.xml' + goals: | + clean package + {opendaylight-infra-mvn-opts} + settings: autorelease-settings + settings-type: cfp + global-settings: global-settings + global-settings-type: cfp + - autorelease-generate-release-notes + + publishers: + - lf-infra-publish + +- job-template: + name: '{project-name}-validate-autorelease-{stream}' + disabled: false + + project-type: freestyle + node: '{build-node}' + concurrent: true + jdk: openjdk8 + + properties: + - lf-infra-properties: + build-days-to-keep: 7 + + parameters: + - lf-infra-parameters: + project: '{project}' + stream: '{stream}' + branch: '{branch}' + - autorelease-release-tag: + release-tag: validate + - string: + name: CLONE_URL + default: '{git-url}/releng/autorelease' + description: "Autorelease clone URL" scm: - git: + url: '$CLONE_URL' credentials-id: 'opendaylight-jenkins-ssh' - url: '$GIT_BASE' - refspec: '$GERRIT_REFSPEC' + refspec: '' branches: - - '$GERRIT_BRANCH' - choosing-strategy: 'gerrit' + - 'origin/{branch}' skip-tag: true submodule: recursive: true + timeout: 60 wrappers: - opendaylight-infra-wrappers: - build-timeout: '30' + build-timeout: '{build-timeout}' triggers: - - timed: '0 0 * * 0' + - gerrit-trigger-patch-submitted: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '**/*.xml' builders: - # force jenkins install of maven version before any shell scripts use it + - jacoco-nojava-workaround + - autorelease-checkout-gerrit-patch + - 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' - goals: '-version' - settings: 'autorelease-settings' + 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: 'odl-global-settings' + global-settings: global-settings global-settings-type: cfp - maven-target: - maven-version: 'mvn33' - pom: '$WORKSPACE/scripts/release_notes_management/pom.xml' + maven-version: mvn33 + pom: pom.xml goals: | - clean package - -Dcheckstyle.skip=true - -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage + clean validate + -Pq {opendaylight-infra-mvn-opts} java-opts: - - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' - settings: 'autorelease-settings' + - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' + settings: autorelease-settings settings-type: cfp - global-settings: 'odl-global-settings' + global-settings: global-settings global-settings-type: cfp - - autorelease-generate-release-notes publishers: - - opendaylight-infra-sysstats + - email-notification: + email-recipients: '{email-recipients}' + email-prefix: '[autorelease] [{project-name}]' - lf-infra-publish