Introduce verify-tox to replace verify-python over time 29/45729/6
authorVratko Polak <vrpolak@cisco.com>
Fri, 16 Sep 2016 14:07:36 +0000 (16:07 +0200)
committerVratko Polak <vrpolak@cisco.com>
Fri, 14 Oct 2016 13:40:33 +0000 (15:40 +0200)
The python-verify job has been executing "tox",
which runs tox environments specified in envlist.
At first, this was only "pep8" (hence python),
but now it can be "docs" or combinations with anything else.

Because of that, "python" is no longer a correct description in general.

This Change introduces template with "tox" instead of "python"
in its name, They are aliases to each other so are identical except in
name.

Change-Id: Ibe2121281ba24b4f6a102900721e57ff7a6977be
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
docs/jenkins.rst
jjb/releng-templates.yaml

index 86817c585b3f897db4d275b3a8f89c7d6dd7d1c4..4a594ca65500dd524e73f32041aeac0bb24ce261 100644 (file)
@@ -735,16 +735,20 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.
       </tr>
 
       <tr class="warning">
-        <td><b>Job Template</b><br/>{project}-verify-python-{stream}</td>
+        <td><b>Job Template</b><br/>{project}-verify-python-{stream} | {project}-verify-tox-{stream}</td>
         <td><b>Gerrit Trigger</b><br/>recheck | reverify</td>
       </tr>
       <tr>
         <td colspan="2">
-          This job template can be used by a project that contains Python. It
+          This job template can be used by a project that uses Tox to build. It
           simply installs a Python virtualenv and uses tox to run the tests
           defined in the project's tox.ini file. If the tox.ini is anywhere
           other than the project's repo root, the path to its directory
           relative to the project's repo root should be passed as {toxdir}.
+
+          The 2 template names verify-python & verify-tox are identical and are
+          aliases to each other. This allows the project to use the naming that
+          is most reasonable for them.
         </td>
       </tr>
 
index 270820027e00aa11dc34578a4eaa0023b1b540ae..e41dc861118377d790abdef69f614569f1f8618f 100644 (file)
         - opendaylight-infra-shiplogs:
             maven-version: 'mvn33'
 
-# 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. boron or carbon)
     #     branch:    git branch (eg. stable/boron or master)
 
     logrotate:
         daysToKeep: '7'
-        numToKeep: '-1'
-        artifactDaysToKeep: '-1'
-        artifactNumToKeep: '-1'
 
     parameters:
         - opendaylight-infra-parameters:
         - opendaylight-infra-shiplogs:
             maven-version: 'mvn33'
 
+- 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.
+
+    <<: *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.
+
+    <<: *tox_builder_verify
+
 - job-template:
     name: '{project-name}-merge-rtd-{stream}'
     # Template for ReadTheDocs triggering