X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Freleng-templates.yaml;h=0971a1f8e3ff81e5a55834c61522c353a0914531;hb=fc441b2b3f644271eef0b5f8807f6294b702ec9e;hp=1313166fdaa2984ab035b1c06fec46c3d43e9052;hpb=f02bfd0f93763865e4024389b38a4585be1c361c;p=releng%2Fbuilder.git diff --git a/jjb/releng-templates.yaml b/jjb/releng-templates.yaml index 1313166fd..0971a1f8e 100644 --- a/jjb/releng-templates.yaml +++ b/jjb/releng-templates.yaml @@ -1,3 +1,4 @@ +--- - job-template: name: '{project-name}-release-java' @@ -8,56 +9,63 @@ node: '{build-node}' jdk: '{jdk}' - logrotate: - daysToKeep: '30' + properties: + - opendaylight-infra-properties: + build-days-to-keep: 30 parameters: - - opendaylight-infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' - - build-tag - - stage-id-parameter: - stage-id: '{stage-id}' + - opendaylight-infra-parameters: + os-cloud: '{os-cloud}' + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - build-tag + - stage-id-parameter: + stage-id: '{stage-id}' scm: - - git: - credentials-id: 'opendaylight-jenkins-ssh' - url: '$GIT_BASE' - branches: - - '$BUILD_TAG' - skip-tag: true - shallow-clone: true - wipe-workspace: true + - git: + credentials-id: 'opendaylight-jenkins-ssh' + url: '$GIT_BASE' + branches: + - '$BUILD_TAG' + skip-tag: true + shallow-clone: true + wipe-workspace: true wrappers: - - opendaylight-infra-wrappers: - build-timeout: '{build-timeout}' + - opendaylight-infra-wrappers: + build-timeout: '{build-timeout}' builders: - - wipe-org-opendaylight-repo - - jacoco-nojava-workaround - - provide-maven-settings: - global-settings-file: 'odl-global-settings' - settings-file: 'autorelease-settings' - - maven-target: - maven-version: '{mvn33}' - pom: 'pom.xml' - goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Djenkins -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage' - java-opts: - - '-Xmx1024m -XX:MaxPermSize=256m' - settings: 'autorelease-settings' - settings-type: cfp - global-settings: 'odl-global-settings' - global-settings-type: cfp - - releng-stage-release + - wipe-org-opendaylight-repo + - jacoco-nojava-workaround + - provide-maven-settings: + global-settings-file: 'odl-global-settings' + settings-file: 'autorelease-settings' + - maven-target: + maven-version: 'mvn33' + pom: 'pom.xml' + goals: > + clean deploy -V -B + -Dmaven.repo.local=/tmp/r + -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r + -Djenkins + -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage + java-opts: + - '-Xmx1024m -XX:MaxPermSize=256m' + settings: 'autorelease-settings' + settings-type: cfp + global-settings: 'odl-global-settings' + global-settings-type: cfp + - releng-stage-release publishers: - - email-notification: - email-prefix: '[releng]' - - opendaylight-infra-shiplogs: - maven-version: '{mvn33}' + - email-notification: + email-recipients: '{email-recipients}' + email-prefix: '[releng]' + - lf-infra-publish - job-template: @@ -70,130 +78,171 @@ jdk: '{jdk}' parameters: - - opendaylight-infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' - - p2zip-parameter + - opendaylight-infra-parameters: + os-cloud: '{os-cloud}' + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' + - p2zip-parameter wrappers: - - opendaylight-infra-wrappers: - build-timeout: '{build-timeout}' + - opendaylight-infra-wrappers: + build-timeout: '{build-timeout}' builders: - - wipe-org-opendaylight-repo - - jacoco-nojava-workaround - - releng-fetch-p2zip-if-necessary: - maven-version: '{mvn33}' - settings: '{mvn-settings}' - global-settings: 'odl-global-settings' - - releng-generate-p2pom - - maven-target: - maven-version: '{mvn33}' - pom: 'pom.xml' - goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r' - settings: '{mvn-settings}' - settings-type: cfp - global-settings: 'odl-global-settings' - global-settings-type: cfp - - releng-update-p2composite-metadata: - maven-version: '{mvn33}' - settings: '{mvn-settings}' - global-settings: 'odl-global-settings' + - wipe-org-opendaylight-repo + - jacoco-nojava-workaround + - releng-fetch-p2zip-if-necessary: + maven-version: 'mvn33' + settings: '{mvn-settings}' + global-settings: 'odl-global-settings' + - releng-generate-p2pom + - maven-target: + maven-version: 'mvn33' + pom: 'pom.xml' + goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r' + settings: '{mvn-settings}' + settings-type: cfp + global-settings: 'odl-global-settings' + global-settings-type: cfp + - releng-update-p2composite-metadata: + maven-version: 'mvn33' + settings: '{mvn-settings}' + global-settings: 'odl-global-settings' publishers: - - email-notification: - email-prefix: '[releng]' - - opendaylight-infra-shiplogs: - maven-version: '{mvn33}' + - email-notification: + email-recipients: '{email-recipients}' + email-prefix: '[releng]' + - lf-infra-publish -# Python Related +# Generic tox-based verify action -- job-template: - name: '{project-name}-verify-python-{stream}' +- tox_builder_verify: &tox_builder_verify + name: tox_builder_verify - # Job template for python verify jobs - # - # The purpose of this job template is to run tox for projects using this - # template. - # # Required Variables: - # stream: release stream (eg. stable-lithium or beryllium) - # branch: git branch (eg. stable/lithium or master) + # branch: git branch (eg. stable/boron or master) # toxdir: directory containing the project's tox.ini relative to # the workspace. Empty works if tox.ini is at project root. + # Note that stream value is not needed. project-type: freestyle node: '{build-node}' concurrent: true - logrotate: - daysToKeep: '7' - numToKeep: '-1' - artifactDaysToKeep: '-1' - artifactNumToKeep: '-1' + properties: + - opendaylight-infra-properties: + build-days-to-keep: 7 parameters: - - opendaylight-infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' + - 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' - basedir: 'repo' - refspec: '$GERRIT_REFSPEC' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: 'gerrit' + - git: + credentials-id: 'opendaylight-jenkins-ssh' + url: '$GIT_BASE' + basedir: 'repo' + refspec: '$GERRIT_REFSPEC' + branches: + - 'origin/$GERRIT_BRANCH' + skip-tag: true + choosing-strategy: 'gerrit' + submodule: + recursive: true wrappers: - - opendaylight-infra-wrappers: - build-timeout: '{build-timeout}' + - opendaylight-infra-wrappers: + build-timeout: '{build-timeout}' triggers: - - gerrit: - server-name: 'OpenDaylight' - trigger-on: - - patchset-created-event: - exclude-drafts: 'true' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: '{toxdir}/**' + - gerrit-trigger-patch-submitted: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '{toxdir}/**' builders: - - shell: | - virtualenv $WORKSPACE/venv-tox - source $WORKSPACE/venv-tox/bin/activate - pip install --upgrade pip - pip install --upgrade tox argparse - pip freeze - cd $WORKSPACE/repo/{toxdir} - tox + - shell: | + virtualenv $WORKSPACE/venv-tox + source $WORKSPACE/venv-tox/bin/activate + PYTHON="$WORKSPACE/venv-tox/bin/python" + $PYTHON -m pip install --upgrade pip + $PYTHON -m pip install --upgrade tox argparse + $PYTHON -m pip freeze + cd $WORKSPACE/repo/{toxdir} + tox publishers: - - email-notification: - email-prefix: '[{project}]' - - opendaylight-infra-shiplogs: - maven-version: '{mvn33}' + - email-notification: + email-recipients: '{email-recipients}' + email-prefix: '[{project}]' + - lf-infra-publish + +- job-template: + name: '{project-name}-verify-tox-{stream}' + + # Job template for verify jobs executing tox envlist + # + # The purpose of this job template is to run tox for projects using this + # template. + # + # Required Variables: + # stream: release stream (eg. stable-lithium or beryllium) + # branch: git branch (eg. stable/lithium or master) + # toxdir: directory containing the project's tox.ini relative to + # the workspace. Empty works if tox.ini is at project root. + + build-node: centos7-java-builder-2c-4g + + <<: *tox_builder_verify + +# Specification for projects outside release cycle, to avoid referring a stream. +# This is useful mailny for integration-test-jobs, which defines streams for Integration/Distribution, +# but the tox job is related to Integration/Test only. + +- job-template: + name: '{project-name}-verify-tox-master' + + # Job template for verify jobs executing tox envlist + # + # The purpose of this job template is to run tox for projects using this + # template. + # + # Required Variables: + # toxdir: directory containing the project's tox.ini relative to + # the workspace. Empty works if tox.ini is at project root. + + build-node: centos7-java-builder-2c-4g + branch: master + + <<: *tox_builder_verify + +# Python (pep8) specific, project should migrate to {project-name}-verify-tox-{stream} + +- job-template: + name: '{project-name}-verify-python-{stream}' + + # Job template for python verify jobs + # + # The purpose of this job template is to run tox for projects using this + # template. + # + # Required Variables: + # stream: release stream (eg. stable-lithium or beryllium) + # branch: git branch (eg. stable/lithium or master) + # toxdir: directory containing the project's tox.ini relative to + # the workspace. Empty works if tox.ini is at project root. + + build-node: centos7-java-builder-2c-4g + + <<: *tox_builder_verify - job-template: name: '{project-name}-merge-rtd-{stream}' @@ -204,30 +253,32 @@ concurrent: false parameters: - - opendaylight-infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' + - opendaylight-infra-parameters: + os-cloud: '{os-cloud}' + project: '{project}' + branch: '{branch}' + refspec: 'refs/heads/{branch}' + artifacts: '{archive-artifacts}' wrappers: - - opendaylight-infra-wrappers: - build-timeout: '{build-timeout}' + - opendaylight-infra-wrappers: + build-timeout: '{build-timeout}' triggers: - - gerrit-trigger-patch-merged: - name: '{project}' - branch: '{branch}' + - gerrit-trigger-patch-merged: + server-name: '{server-name}' + name: '{project}' + branch: '{branch}' builders: - - shell: | - curl -X POST https://readthedocs.org/build/{rtdproject} + - shell: | + curl -X POST https://readthedocs.org/build/{rtdproject} publishers: - - email-notification: - email-prefix: '[{project}]' - - opendaylight-infra-shiplogs: - maven-version: '{mvn33}' + - email-notification: + email-recipients: '{email-recipients}' + email-prefix: '[{project}]' + - lf-infra-publish # Node related @@ -241,8 +292,8 @@ # virtualenv for nodejs. # # Required Variables: - # stream: release stream (eg. stable-lithium or beryllium) - # branch: git branch (eg. stable/lithium or master) + # stream: release stream (eg. boron or carbon) + # branch: git branch (eg. stable/boron or master) # nodedir: directory of nodejs project to run node test against # nodever: version of node to install in virtualenv @@ -250,76 +301,60 @@ node: '{build-node}' concurrent: true - logrotate: - daysToKeep: '7' - numToKeep: '-1' - artifactDaysToKeep: '-1' - artifactNumToKeep: '-1' + properties: + - opendaylight-infra-properties: + build-days-to-keep: 7 parameters: - - opendaylight-infra-parameters: - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' + - 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' - basedir: 'repo' - refspec: '$GERRIT_REFSPEC' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: 'gerrit' + - git: + credentials-id: 'opendaylight-jenkins-ssh' + url: '$GIT_BASE' + basedir: 'repo' + refspec: '$GERRIT_REFSPEC' + branches: + - 'origin/$GERRIT_BRANCH' + skip-tag: true + choosing-strategy: 'gerrit' wrappers: - - opendaylight-infra-wrappers: - build-timeout: '{build-timeout}' + - opendaylight-infra-wrappers: + build-timeout: '{build-timeout}' triggers: - - gerrit: - server-name: 'OpenDaylight' - trigger-on: - - patchset-created-event: - exclude-drafts: 'true' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: '{nodedir}/**' + - gerrit-trigger-patch-submitted: + server: '{server-name}' + project: '{project}' + branch: '{branch}' + files: '{nodedir}/**' builders: - - shell: | - #!/bin/bash - # Prepare Python - virtualenv $WORKSPACE/venv-python - source $WORKSPACE/venv-python/bin/activate - pip install --upgrade pip - pip install --upgrade tox argparse nodeenv - pip freeze - - # Prepare node - nodeenv --node={nodever} --prebuilt $WORKSPACE/venv-node - source $WORKSPACE/venv-node/bin/activate - cd $WORKSPACE/repo/{nodedir} - npm install - npm test + - shell: | + #!/bin/bash + # Prepare Python + virtualenv $WORKSPACE/venv-python + source $WORKSPACE/venv-python/bin/activate + PYTHON="$WORKSPACE/venv-python/bin/python" + $PYTHON -m pip install --upgrade pip + $PYTHON -m pip install --upgrade tox argparse nodeenv + $PYTHON -m pip freeze + + # Prepare node + nodeenv --node={nodever} --prebuilt $WORKSPACE/venv-node + source $WORKSPACE/venv-node/bin/activate + cd $WORKSPACE/repo/{nodedir} + npm install + npm test publishers: - - email-notification: - email-prefix: '[{project}]' - - opendaylight-infra-shiplogs: - maven-version: '{mvn33}' + - email-notification: + email-recipients: '{email-recipients}' + email-prefix: '[{project}]' + - lf-infra-publish