Allow projects to choose which stream to enable validate job 07/30107/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 24 Nov 2015 02:16:26 +0000 (21:16 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 24 Nov 2015 16:11:02 +0000 (11:11 -0500)
Change-Id: Id6a2eb0204f456c739e1a2f05504d3c34bafbbd7
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb-templates/validate-autorelease.yaml
jjb/ttp/ttp.cfg
jjb/usc/usc.cfg
jjb/usecplugin/usecplugin.cfg
scripts/jjb-init-project.py
scripts/jjblib.py
src/site/markdown/jenkins.markdown

index c95680e8f49225f7f0b18cbe4a9845fc24f493ef..5332c3184f4fa8ba67dbf64bd55dd66af27f1eee 100644 (file)
@@ -1,5 +1,6 @@
 - job-template:
     name: 'PROJECT_SHORTNAME-validate-autorelease-{stream}'
+    disabled: '{autorelease}'
 
     project-type: maven
     node: dynamic_verify
index 2a2a5c10ec1de88ac20b5547b8255b42c66181cc..81bc06d8cc5df5b000574f09de4a8ea50f557164 100644 (file)
@@ -2,10 +2,10 @@ STREAMS:
 - beryllium:
     branch: master
     jdks: openjdk7,openjdk8
+    autorelease: true
 - stable-lithium:
     branch: stable/lithium
     jdks: openjdk7
 - stable-helium:
     branch: stable/helium
     jdks: openjdk7
-AUTORELEASE: true
index fffb7b27ad4513b9968479dc6f2ac1c2792514ab..4455c9f851a41a9179fc74517bf778b05d6767ec 100644 (file)
@@ -2,8 +2,8 @@ STREAMS:
 - beryllium:
     branch: master
     jdks: openjdk7,openjdk8
+    autorelease: true
 - stable-lithium:
     branch: stable/lithium
     jdks: openjdk8,openjdk7
 DEPENDENCIES: controller,yangtools,odlparent
-AUTORELEASE: true
index feb7e02b62c3db84d16af0071d6c91720c2bc3fd..89c43e8fd0c065d8b41b6f47294f5632278df593 100644 (file)
@@ -2,5 +2,5 @@ STREAMS:
 - beryllium:
     branch: master
     jdks: openjdk7,openjdk8
+    autorelease: true
 DEPENDENCIES: openflowplugin,odlparent,controller,yangtools
-AUTORELEASE: true
index d4bb6d0374ae09f3d1ca72609bb7f9a1315a0ece..a5df316dac840145fcdef7abb28d57dc2aebe81d 100644 (file)
@@ -59,9 +59,7 @@ if cfg.get("JOB_TEMPLATES"):
 else:
     templates = "verify,merge,daily,distribution,integration,sonar"
 templates += ",clm"  # ensure we always create a clm job for all projects
-
-if cfg.get("AUTORELEASE"):
-    templates += ",validate-autorelease"
+templates += ",validate-autorelease"  # Autorelease validate template
 
 ##################
 # Handle Streams #
@@ -86,6 +84,11 @@ for stream, options in streams.items():
     for jdk in options["jdks"].split(","):
         str_streams += "                - %s\n" % jdk.strip()
 
+    # Disable autorelease validate job unless project is participating
+    # in autorelease
+    str_streams += "            autorelease: %s\n" % options.get(
+        "autorelease", False)
+
 ###############
 # Handle JDKS #
 ###############
index f5980929ba911210d9d1323eb0a4ba07a49fcce7..56e98d6aa56f100ac0827ed69b17d8722db249a6 100644 (file)
@@ -28,10 +28,6 @@ def parse_jjb_args():
                         help="Comma-seperated list of patterns of artifacts "
                              "to archive on build completion. "
                              "See: http://ant.apache.org/manual/Types/fileset.html")  # noqa
-    parser.add_argument("-r", "--autorelease", action="store_true",
-                        help="Enable the validate-autorelease job, you "
-                             "should enable this if your project is part of "
-                             "the simultanious release.")
     return parser.parse_args()
 
 
@@ -69,9 +65,6 @@ def create_template_config(project_dir, args):
     if args.archive_artifacts:
         cfg_data["ARCHIVE"] = args.archive_artifacts
 
-    if args.autorelease:
-        cfg_data["AUTORELEASE"] = args.autorelease
-
     if cfg_data:
         # Create project directory if it doesn't exist
         if not os.path.exists(project_dir):
index e147872bfd17b3fca9201078ee7ae9412cffdcd1..10690af98e326e279b07f5af47110f5cb71e63dd 100644 (file)
@@ -474,10 +474,6 @@ jjb/\<project\>/\<project\>.yaml containing your project's base template.
     #                             See: http://ant.apache.org/manual/Types/fileset.html
     #
     #          Example      : *.log,*.patches
-    #
-    # -r / --autorelease    : Switch to enable the project-validate-autorelease
-    #                         job. Projects that are part of the simultanious
-    #                         release need to have this enabled.
 
 If all your project requires is the basic verify, merge, and
 daily jobs then using the job template should be all you need to
@@ -509,15 +505,17 @@ NOT want to tune simply remove the parameter or comment out the line with a
     JOB_TEMPLATES: verify,merge,sonar
     STREAMS:
     - beryllium:
+        branch: master
         jdks: openjdk7,openjdk8
-    - stable/lithium:
+        autorelease: true
+    - stable-lithium:
+        branch: stable/lithium
         jdks: openjdk7
     POM: dfapp/pom.xml
     MVN_GOALS: clean install javadoc:aggregate -DrepoBuild -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo
     MVN_OPTS: -Xmx1024m -XX:MaxPermSize=256m
     DEPENDENCIES: aaa,controller,yangtools
     ARCHIVE_ARTIFACTS: *.logs, *.patches
-    AUTORELEASE: true
 
 Note: BRANCHES is a list of branches you want JJB to generate jobs for, the
 first branch will be the branch that reports Sonar analysis. Each branch must
@@ -525,6 +523,11 @@ additionally define a "jdks:" section listing the jdks the verify jobs should
 run tests against for the branch; additionally the first jdk listed will be
 used as the default jdk for non-verify type jobs.
 
+Note: Projects that are participating in the simultanious release should set
+"autorelease: true" under the streams they are participating in autorelease
+for. This enables a new job type validate-autorelease which is used to help
+identify if Gerrit patches might break autorelease or not.
+
 #### Advanced
 
 It is also possible to take advantage of both the auto updater and creating