X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fautorelease-templates.yaml;h=64383697f16539d99839d1ac151df5891af76733;hb=93db3a3bd3a1fcf666cac50f85e34fc4a2b43995;hp=7e5138f08f15b3032967a02ffc3b32c5ad125e0e;hpb=5f3fae44e6909f20a555893e840e213b1aff1c44;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/autorelease-templates.yaml b/jjb/autorelease/autorelease-templates.yaml index 7e5138f08..b7f06d9f9 100644 --- a/jjb/autorelease/autorelease-templates.yaml +++ b/jjb/autorelease/autorelease-templates.yaml @@ -37,7 +37,9 @@ branch: master refspec: 'refs/heads/master' jenkins-ssh-credential: opendaylight-jenkins-ssh + submodule-disable: false submodule-recursive: true + submodule-timeout: 10 choosing-strategy: default wrappers: @@ -52,7 +54,7 @@ - lf-infra-publish - job-template: - name: 'autorelease-release-{stream}' + name: 'autorelease-release-{stream}-{mvn-version}-{java-version}' ###################### # Default parameters # @@ -60,9 +62,17 @@ build-node: '{build-node}' cron: 'H 0 * * *' - java-version: openjdk8 + java-version: '{java-version}' + mvn-global-settings: global-settings + mvn-goals: clean deploy + mvn-opts: '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' + mvn-params: '' + mvn-settings: autorelease-settings mvn-version: mvn35 - extra-mvn-opts: '' + sign-artifacts: true + mvn-central: true + ossrh-profile-id: 6386ebbbf3a563 + disable-job: 'false' ##################### # Job Configuration # @@ -70,39 +80,34 @@ project-type: freestyle node: '{build-node}' - jdk: '{java-version}' + disabled: '{disable-job}' properties: - lf-infra-properties: build-days-to-keep: 30 parameters: - - maven-exec: - maven-version: 'mvn35' - lf-infra-parameters: project: '{project}' stream: '{stream}' branch: '{branch}' lftools-version: '{lftools-version}' + - lf-infra-maven-parameters: + mvn-opts: '{mvn-opts}' + mvn-params: '{mvn-params}' + mvn-version: '{mvn-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 + release-tag: '{stream}' - string: name: ARCHIVE_ARTIFACTS default: '{archive-artifacts}' description: Artifacts to archive to the logs server. + - string: + name: STAGING_PROFILE_ID + default: '{staging-profile-id}' + description: Nexus staging profile ID. scm: - git: @@ -125,18 +130,21 @@ - timed: '{cron}' builders: + - lf-infra-pre-build # 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 + - lf-jacoco-nojava-workaround - shell: "./scripts/list-project-dependencies.sh" - autorelease-determine-merge-order - - autorelease-cfp: - autorelease-settings: 'autorelease-settings' - global-settings: 'odl-global-settings' + - lf-provide-maven-settings: + global-settings-file: '{mvn-global-settings}' + settings-file: '{mvn-settings}' - autorelease-generate-release-patches - autorelease-generate-artifact-versions + - lf-update-java-alternatives: + java-version: '{java-version}' - autorelease-distribute-taglist - distribute-build-url: path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly' @@ -145,30 +153,27 @@ # 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: 'mvn35' - 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 + - lf-maven-build: + mvn-goals: '{mvn-goals}' + - lf-sigul-sign-dir: + sign-artifacts: '{sign-artifacts}' + sign-dir: '$WORKSPACE/m2repo' + sign-mode: serial + - lf-maven-stage: + mvn-global-settings: '{mvn-global-settings}' + mvn-settings: '{mvn-settings}' + mvn-staging-id: '{mvn-staging-id}' + - lf-maven-central: + mvn-central: '{mvn-central}' + mvn-global-settings: '{mvn-global-settings}' + mvn-settings: '{mvn-settings}' + ossrh-profile-id: '{ossrh-profile-id}' - autorelease-get-integration-test-variables - autorelease-maven-sources: opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}' - maven-version: 'mvn35' - settings: 'autorelease-settings' - global-settings: 'global-settings' - - autorelease-maven-sources-post-process + maven-version: '{mvn-version}' + settings: '{mvn-settings}' + global-settings: '{mvn-global-settings}' - shell: | mkdir -p archives/ cp *.log *.prop $_ @@ -183,13 +188,6 @@ - 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 @@ -211,6 +209,73 @@ mark-unstable-if-failed: false - lf-infra-publish +- job-template: + name: 'autorelease-update-submodules-{stream}' + + ###################### + # Default parameters # + ###################### + + cron: 'H 0 * * *' + disable-job: 'false' + + ##################### + # Job configuration # + ##################### + + project-type: freestyle + node: centos7-builder-2c-2g + disabled: '{disable-job}' + + properties: + - lf-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}' + + scm: + - lf-infra-gerrit-scm: + git-url: '$GIT_URL/$GERRIT_PROJECT' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + jenkins-ssh-credential: opendaylight-jenkins-ssh + submodule-disable: false + submodule-recursive: true + submodule-timeout: 10 + choosing-strategy: default + + wrappers: + - lf-infra-wrappers: + build-timeout: 10 + jenkins-ssh-credential: opendaylight-jenkins-ssh + + triggers: + - timed: '{obj:cron}' + + builders: + - lf-infra-pre-build + # Fetch latest head of branch + - shell: | + git checkout $GERRIT_BRANCH + git submodule update --remote + git add . + - lf-infra-push-gerrit-patch: + project: '{project}' + gerrit-user: 'jenkins-$SILO' + gerrit-host: 'git.opendaylight.org' + gerrit-topic: 'autorelease-update-submodules' + gerrit-commit-message: 'Update submodules to latest HEAD of branch' + reviewers-email: '' + + publishers: + - lf-infra-publish + - job-template: name: autorelease-update-validate-jobs-{stream} @@ -219,6 +284,7 @@ ###################### cron: '@weekly' + disable-job: 'false' ##################### # Job configuration # @@ -226,6 +292,7 @@ project-type: freestyle node: centos7-builder-2c-1g + disabled: '{disable-job}' properties: - lf-infra-properties: @@ -244,7 +311,9 @@ branch: master refspec: 'refs/heads/master' jenkins-ssh-credential: opendaylight-jenkins-ssh + submodule-disable: false submodule-recursive: true + submodule-timeout: 10 choosing-strategy: default triggers: @@ -271,21 +340,40 @@ jenkins-ssh-credential: opendaylight-jenkins-ssh builders: + - lf-infra-pre-build - autorelease-update-project-views - autorelease-update-validate-projects - - opendaylight-infra-push-gerrit-patch: - project: 'releng/builder' + - lf-infra-push-gerrit-patch: + project: '{project}' + gerrit-user: 'jenkins-$SILO' + gerrit-host: 'git.opendaylight.org' gerrit-topic: 'autorelease-update-validate-jobs-{stream}' gerrit-commit-message: | - Update validate autorelease projects for {stream} + 'Update validate autorelease projects for {stream}' + reviewers-email: 'jenkins-releng@opendaylight.org' publishers: - lf-infra-publish - job-template: name: autorelease-version-bump-{stream} + + ##################### + # Default variables # + ##################### + + mvn-global-settings: global-settings + mvn-settings: autorelease-settings + mvn-version: mvn35 + disable-job: 'false' + + ##################### + # Job configuration # + ##################### + project-type: freestyle node: '{build-node}' + disabled: '{disable-job}' properties: - opendaylight-infra-properties: @@ -300,7 +388,7 @@ lftools-version: '{lftools-version}' - string: name: RELEASE_TAG - default: '{next-release-tag}' + default: '{stream}' description: | Release that is being version bumped. Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2... @@ -319,7 +407,7 @@ and artifacts are not pushed to Nexus. Instead the build will be performed using the goals "clean install". - maven-exec: - maven-version: mvn35 + maven-version: '{mvn-version}' scm: - lf-infra-gerrit-scm: @@ -327,7 +415,9 @@ branch: '{branch}' refspec: 'refs/heads/{branch}' jenkins-ssh-credential: opendaylight-jenkins-ssh + submodule-disable: false submodule-recursive: true + submodule-timeout: 10 choosing-strategy: default wrappers: @@ -336,17 +426,14 @@ jenkins-ssh-credential: opendaylight-jenkins-ssh builders: + - lf-infra-pre-build # force jenkins install of maven version before any shell scripts use it - - maven-target: - maven-version: mvn35 - goals: '-version' - settings: autorelease-settings - settings-type: cfp - global-settings: global-settings - global-settings-type: cfp - - autorelease-cfp + - lf-maven-install: + mvn-version: '{mvn-version}' + - lf-provide-maven-settings: + global-settings-file: '{mvn-global-settings}' + settings-file: '{mvn-settings}' - shell: !include-raw-escape: - - ../global-jjb/shell/lftools-install.sh - version-bump.sh publishers: @@ -358,6 +445,7 @@ ###################### # Default parameters # ###################### + disable-job: 'false' gerrit_merge_triggers: - comment-added-contains-event: @@ -369,6 +457,7 @@ project-type: freestyle node: centos7-builder-2c-8g + disabled: '{disable-job}' properties: - lf-infra-properties: @@ -382,15 +471,18 @@ lftools-version: '{lftools-version}' - string: name: RELEASE - description: Release to generate release notes for. - + description: | + Release to generate release notes for. + Eg. Neon-SR1, Fluorine-SR2... scm: - lf-infra-gerrit-scm: git-url: '$GIT_URL/$GERRIT_PROJECT' branch: '$GERRIT_BRANCH' refspec: '$GERRIT_REFSPEC' jenkins-ssh-credential: opendaylight-jenkins-ssh + submodule-disable: false submodule-recursive: true + submodule-timeout: 10 choosing-strategy: default wrappers: @@ -410,6 +502,7 @@ branch-pattern: '**/{branch}' builders: + - lf-infra-pre-build - autorelease-generate-release-notes publishers: @@ -418,23 +511,27 @@ - job-template: name: '{project-name}-validate-autorelease-{stream}' - ############ - # Defaults # - ############ + ##################### + # Default variables # + ##################### java-version: openjdk8 + mvn-global-settings: global-settings + mvn-settings: autorelease-settings + mvn-version: mvn35 + disable-job: 'false' ##################### # Job Configuration # ##################### - disabled: false project-type: freestyle # Note: This NEEDS to be hardcoded as projects should NOT be allowed to # override the build node. node: centos7-builder-2c-8g concurrent: true jdk: '{java-version}' + disabled: '{disable-job}' properties: - lf-infra-properties: @@ -475,11 +572,13 @@ project: '{project}' branch: '{branch}' files: '**/*.xml' + forbidden-files: '' builders: + - lf-infra-pre-build - autorelease-checkout-gerrit-patch - autorelease-compare-projects - - jacoco-nojava-workaround + - lf-jacoco-nojava-workaround - shell: "./scripts/list-project-dependencies.sh" - autorelease-determine-merge-order - autorelease-generate-release-patches @@ -489,7 +588,7 @@ # to enable building in a single maven reactor afterwards. - autorelease-fix-relative-paths - maven-target: - maven-version: mvn35 + maven-version: '{mvn-version}' pom: validate-pom.xml goals: | clean install dependency:tree @@ -498,14 +597,12 @@ {opendaylight-infra-mvn-opts} java-opts: - '-Xmx8g' - settings: autorelease-settings + settings: '{mvn-settings}' settings-type: cfp - global-settings: global-settings + global-settings: '{mvn-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 || true - maven-target: - maven-version: mvn35 + maven-version: '{mvn-version}' pom: pom.xml goals: | clean validate @@ -513,9 +610,9 @@ {opendaylight-infra-mvn-opts} java-opts: - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' - settings: autorelease-settings + settings: '{mvn-settings}' settings-type: cfp - global-settings: global-settings + global-settings: '{mvn-global-settings}' global-settings-type: cfp - shell: | mkdir -p archives/