Use different slaves based on JDK version projects need 82/1982/4
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 20 Aug 2019 16:37:42 +0000 (16:37 +0000)
committerFatih Degirmenci <fdegir@gmail.com>
Wed, 21 Aug 2019 22:45:00 +0000 (22:45 +0000)
New base images for build servers with jdk8 and jdk11 are created
on City Nordix Tenant and Jenkins OpenStack Cloud Plugin is configured
to provision 1 slave for each jdk version we need.

JAVA_HOME is also set to same place in both base images so we don't
need to worry about overriding it manually.

New slaves are labelled with onap-build-ubuntu1604-jdk8 and onap-build-ubuntu1604-jdk11.
  https://jenkins.nordix.org/label/onap-build-ubuntu1604-jdk8/
  https://jenkins.nordix.org/label/onap-build-ubuntu1604-jdk11/

The old slave, base instance, and the base image will be removed from Jenkins
and from OpenStack tenant once the new image and slave are verified.

Change-Id: I7325088ed74f45acb4e12527ccf3ae16db4c5a51

jjb/onap/dcaegen2-collectors-datafile/dcaegen2-collectors-datafile-verify-jobs.yaml
jjb/onap/global-templates-onap-java.yaml

index c13e785c4f6dbcbc4aa7bc30202fb43931cbd2f3..dde658076cffc00d5b862fd08fca947867bb6462 100644 (file)
     stream:
       - master:
           branch: '{stream}'
+          jdk-version: jdk11
       - dublin:
           branch: '{stream}'
+          jdk-version: jdk8
 
     jobs:
-      - 'onap-{project-name}-{stream}-verify-java':
-         node: geode-ubuntu1804
-         node_labels: geode-ubuntu1804
+      - 'onap-{project-name}-{stream}-verify-java'
index dff9cf13130bfbdf08ba0efa2cfce7c0b914820f..dd8411615bd4f0826dbd4135c5902d8bdf4f529c 100644 (file)
@@ -1,10 +1,6 @@
 - job-template:
     name: 'onap-{project-name}-{stream}-verify-java'
 
-    node: onap-ubuntu1604
-
-    node_labels: onap-ubuntu1604
-
     disabled: false
 
     concurrent: true
     properties:
       - logrotate
 
+    jdk-version: jdk8
+
     parameters:
-      - string:
-          name: NODE_LABELS
-          default: '{node_labels}'
-          description: node to do build on
       - project-parameters:
           project: 'onap/{project}'
           branch: '{branch}'
       - nordix-gerrit-parameters
+      - label:
+          name: SLAVE_LABEL
+          default: 'onap-build-ubuntu1604-{jdk-version}'
+          description: 'Slave label to schedule this job on'
       - string:
           name: JAVA_HOME
-          default: /usr/lib/jvm/java-1.8.0-openjdk-amd64
+          default: /usr/lib/jvm/openjdk-amd64
           description: Java home
       - string:
           name: MVN_VERSION