Disable Lithium jobs
[releng/builder.git] / jjb / releng-templates.yaml
index 4ffb0052add2128899ee1ff2836db9374790392e..e3b4b4203a68fa36bc4f1a7c645a02c96e64f567 100644 (file)
@@ -1,5 +1,124 @@
 - job-template:
-    name: '{name}-verify-python-{stream}'
+    name: '{project-name}-release-java'
+    disabled: {disabled}
+    node: '{build-node}'
+
+    # Job template for producing a release candidate by creating a staging repo
+    # in Nexus.
+
+    project-type: maven
+    jdk: '{jdk}'
+
+    logrotate:
+        daysToKeep: '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}'
+
+    scm:
+        - 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}'
+
+    prebuilders:
+        - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - provide-maven-settings:
+            global-settings-file: 'odl-global-settings'
+            settings-file: 'autorelease-settings'
+
+    maven:
+        maven-name: '{mvn33}'
+        root-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'
+        maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+        settings: 'autorelease-settings'
+        global-settings: 'odl-global-settings'
+        post-step-run-condition: UNSTABLE
+
+    postbuilders:
+        - releng-stage-release
+
+    publishers:
+        - email-notification:
+            email-prefix: '[releng]'
+        - archive-build:
+            maven-version: '{mvn33}'
+
+
+- job-template:
+    name: '{project-name}-publish-p2repo'
+    disabled: {disabled}
+    node: '{build-node}'
+
+    # Job template for publishing a p2 repo given a URL to a zipped p2repo.
+
+    project-type: maven
+    jdk: '{jdk}'
+
+    parameters:
+        - opendaylight-infra-parameters:
+            project: '{project}'
+            branch: '{branch}'
+            refspec: 'refs/heads/{branch}'
+            artifacts: '{archive-artifacts}'
+        - p2zip-parameter
+
+    wrappers:
+        - opendaylight-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    prebuilders:
+        - wipe-org-opendaylight-repo
+        - jacoco-nojava-workaround
+        - releng-fetch-p2zip-if-necessary:
+            maven-version: '{mvn33}'
+            settings: '{project-settings}'
+            global-settings: 'odl-global-settings'
+        - releng-generate-p2pom
+
+    maven:
+        maven-name: '{mvn33}'
+        root-pom: 'pom.xml'
+        goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
+        settings: '{project-settings}'
+        global-settings: 'odl-global-settings'
+        post-step-run-condition: UNSTABLE
+
+    postbuilders:
+        - releng-update-p2composite-metadata:
+            maven-version: '{mvn33}'
+            settings: '{project-settings}'
+            global-settings: 'odl-global-settings'
+
+    publishers:
+        - email-notification:
+            email-prefix: '[releng]'
+        - archive-build:
+            maven-version: '{mvn33}'
+
+# Python Related
+
+- job-template:
+    name: '{project-name}-verify-python-{stream}'
+    disabled: {disabled}
+    node: '{build-node}'
 
     # Job template for python verify jobs
     #
     #     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.
+    #                the workspace. Empty works if tox.ini is at project root.
 
     project-type: freestyle
-    node: dynamic_verify
     concurrent: true
 
     logrotate:
         artifactNumToKeep: '-1'
 
     parameters:
-        - project-parameter:
+        - opendaylight-infra-parameters:
             project: '{project}'
-        - gerrit-parameter:
             branch: '{branch}'
-        - gerrit-refspec-parameter:
             refspec: 'refs/heads/{branch}'
+            artifacts: '{archive-artifacts}'
 
     scm:
         - git:
-            credentials-id: '{ssh-credentials}'
+            credentials-id: 'opendaylight-jenkins-ssh'
             url: '$GIT_BASE'
             basedir: 'repo'
             refspec: '$GERRIT_REFSPEC'
             choosing-strategy: 'gerrit'
 
     wrappers:
-        - build-timeout
-        - ssh-agent-credentials:
-            users:
-                - '{ssh-credentials}'
+        - opendaylight-infra-wrappers:
+            build-timeout: '{build-timeout}'
 
     triggers:
         - gerrit:
     publishers:
         - email-notification:
             email-prefix: '[{project}]'
+        - archive-build:
+            maven-version: '{mvn33}'
+
+- job-template:
+    name: '{project-name}-merge-rtd-{stream}'
+    disabled: {disabled}
+    node: '{build-node}'
+
+    # Template for ReadTheDocs triggering
+
+    project-type: freestyle
+    concurrent: false
+
+    parameters:
+        - opendaylight-infra-parameters:
+            project: '{project}'
+            branch: '{branch}'
+            refspec: 'refs/heads/{branch}'
+            artifacts: '{archive-artifacts}'
+
+    wrappers:
+        - opendaylight-infra-wrappers:
+            build-timeout: '{build-timeout}'
+
+    triggers:
+        - gerrit-trigger-patch-merged:
+            name: '{project}'
+            branch: '{branch}'
+
+    builders:
+        - shell: |
+            curl -X POST https://readthedocs.org/build/{rtdproject}
+
+    publishers:
+        - email-notification:
+            email-prefix: '[{project}]'
+        - archive-build:
+            maven-version: '{mvn33}'
+
+# Node related
+
+- job-template:
+    name: '{project-name}-verify-node-{stream}'
+    disabled: {disabled}
+    node: '{build-node}'
+
+    # Job template for python verify jobs
+    #
+    # The purpose of this job template is to run node tests for projects using
+    # this template. It uses python virtualenv to install nodeenv and create a
+    # virtualenv for nodejs.
+    #
+    # Required Variables:
+    #     stream:    release stream (eg. stable-lithium or beryllium)
+    #     branch:    git branch (eg. stable/lithium or master)
+    #     nodedir:   directory of nodejs project to run node test against
+    #     nodever:   version of node to install in virtualenv
+
+    project-type: freestyle
+    concurrent: true
+
+    logrotate:
+        daysToKeep: '7'
+        numToKeep: '-1'
+        artifactDaysToKeep: '-1'
+        artifactNumToKeep: '-1'
+
+    parameters:
+        - opendaylight-infra-parameters:
+            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'
+
+    wrappers:
+        - 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}/**'
+
+    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
+
+    publishers:
+        - email-notification:
+            email-prefix: '[{project}]'
+        - archive-build:
+            maven-version: '{mvn33}'