X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fautorelease-templates.yaml;h=8ef0deffa26c49d4078f79b864f3c5462f88e78a;hb=4fc94b021568aeb425ec802dce1199f05ff1b12b;hp=269cf528cf1c284c9dd295f5ecab8503182f44f4;hpb=187eb73894a254dfee6584ebbbb1c10a4bb7af5d;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/autorelease-templates.yaml b/jjb/autorelease/autorelease-templates.yaml index 269cf528c..8ef0deffa 100644 --- a/jjb/autorelease/autorelease-templates.yaml +++ b/jjb/autorelease/autorelease-templates.yaml @@ -9,17 +9,26 @@ cron: 'H 0 * * *' properties: - - opendaylight-infra-properties: - build-days-to-keep: '30' + - build-discarder: + days-to-keep: '30' + num-to-keep: 40 + artifact-num-to-keep: 1 + # Make sure we only archive the last artifact until we figure out why + # autorelease carbon is not generating a staging repo. + # - opendaylight-infra-properties: + # build-days-to-keep: '30' parameters: - maven-exec: maven-version: 'mvn33' - opendaylight-infra-parameters: + os-cloud: '{os-cloud}' project: '{project}' 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: @@ -64,7 +73,7 @@ - autorelease-generate-taglist - autorelease-distribute-taglist - distribute-build-url: - path: 'integration/distribution/distribution-karaf/src/main/assembly' + 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. @@ -74,11 +83,12 @@ - maven-target: maven-version: 'mvn33' pom: 'pom.xml' - goals: > - clean deploy -V -B -Pintegrationtests,docs,repoBuild -Djenkins + goals: | + clean deploy + -Pintegrationtests,docs,repoBuild -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 + {opendaylight-infra-mvn-opts} java-opts: - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true' settings: 'autorelease-settings' @@ -88,31 +98,116 @@ - 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: 'odl-global-settings' - autorelease-maven-sources-post-process - - autorelease-sys-stats - shell: | mkdir -p archives/ cp *.log *.prop $_ 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' + # TODO stop archiving **/*.zip once we figure out why artifacts are + # not deploying to Nexus + artifacts: 'dependencies.log, **/*.zip, /var/log/sa/*' - 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 + - 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 - project: 'packaging-build-rpm-master' condition: UNSTABLE_OR_BETTER - predefined-parameters: DOWNLOAD_URL=$BUNDLEURL + predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL property-file: variables.jenkins-trigger fail-on-missing: true - opendaylight-infra-shiplogs: maven-version: 'mvn33' + + +- job-template: + name: 'autorelease-generate-release-notes-{stream}' + + project-type: freestyle + node: centos7-java-builder-2c-8g + + properties: + - opendaylight-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - opendaylight-infra-parameters: + os-cloud: '{os-cloud}' + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + + 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 + + wrappers: + - opendaylight-infra-wrappers: + build-timeout: '30' + + triggers: + - timed: '0 0 * * 0' + + 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 + - maven-target: + maven-version: 'mvn33' + pom: '$WORKSPACE/scripts/release_notes_management/pom.xml' + goals: | + clean package + -Dcheckstyle.skip=true + -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage + {opendaylight-infra-mvn-opts} + 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-generate-release-notes + + publishers: + - opendaylight-infra-sysstats + - archive: + artifacts: 'scripts/release_notes_management/projects/release-notes.rst, /var/log/sa/*' + - opendaylight-infra-shiplogs: + maven-version: 'mvn33'