ONAP CPS: Separate Nordix Jenkins job to run performance tests 99/18699/2
authorrobert.tomczyk <robert.tomczyk.est@gmail.com>
Tue, 27 Jun 2023 09:58:16 +0000 (10:58 +0100)
committerRobert Tomczyk <robert.tomczyk.est@gmail.com>
Tue, 27 Jun 2023 14:59:51 +0000 (14:59 +0000)
Change-Id: If7e69007e983a00049bef7e5c06ce6bcf0c6f144

jjb/global/jjb-macros.yaml
jjb/onap/cps/cps-performance-test-jobs.yaml [new file with mode: 0644]
jjb/onap/global-templates-onap-java.yaml

index c1c6abea06f14e8cfa3b0b3663c5a46360e8d26b..f8c46cbdebc97c2f7e4139a0c6468c01d1ff5882 100644 (file)
           default: ssh://$GERRIT_USER@gerrit.nordix.org:29418
           description: HTTPS URL of Project Repo on Nordix Gerrit to clone repo
 
+# Those parameters are used for ONAP java build jobs in Nordix environment.
+- parameter:
+    name: nordix-onap-java-build-parameters
+    parameters:
+      - string:
+          name: JAVA_HOME
+          default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
+          description: Java home
+      - string:
+          name: MVN_VERSION
+          default: '{mvn_version}'
+          description: Maven version
+      - string:
+          name: MVN_URL
+          default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
+          description: URL to download Maven
+      - string:
+          name: MVN
+          default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
+          description: Path to mvn executable
+      - string:
+          name: MVN_SETTINGS_XML_VERSION
+          default: '{mvn_settings_xml_version}'
+          description: Commit ID of ONAP Oparent repository (https://git.onap.org/oparent/) to pull. Used for Maven settings file. Can be left blank to pull the latest version.
+      - string:
+          name: MVN_PARAMS
+          default: '{mvn_params}'
+          description: Maven build parameters
+      - string:
+          name: SUBDIRECTORY
+          default: '{subdirectory}'
+          description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
+
 - parameter:
     name: onap-gerrit-parameters
     parameters:
diff --git a/jjb/onap/cps/cps-performance-test-jobs.yaml b/jjb/onap/cps/cps-performance-test-jobs.yaml
new file mode 100644 (file)
index 0000000..42dc03f
--- /dev/null
@@ -0,0 +1,36 @@
+---
+#
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2023 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+# this job gets triggered on the specified timer and runs CPS performance
+# test in the Nordix environment.
+
+- project:
+    name: cps-performance-test
+    project: cps
+    project-name: cps
+    timer: "15 2 * * *"
+    mvn_params: "-P include-performance"
+
+    stream:
+      - 'master':
+          branch: '{stream}'
+          jdk-version: java-11
+
+    jobs:
+      - 'onap-{project-name}-{stream}-time-trigger-java'
index 6c874e75cc2cb3bd75f3ac3aab7cbd6d7402a872..a3b881c22274da632b2780eff71e778d88d56f05 100644 (file)
           project: 'onap/{project}'
           branch: '{branch}'
       - nordix-gerrit-parameters
-      - string:
-          name: JAVA_HOME
-          default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64'
-          description: Java home
-      - string:
-          name: MVN_VERSION
-          default: '{mvn_version}'
-          description: Maven version
-      - string:
-          name: MVN_URL
-          default: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MVN_VERSION/apache-maven-${{MVN_VERSION}}-bin.zip
-          description: URL to download Maven
-      - string:
-          name: MVN
-          default: $WORKSPACE/apache-maven-${{MVN_VERSION}}/bin/mvn
-          description: Path to mvn executable
-      - string:
-          name: MVN_SETTINGS_XML_VERSION
-          default: '{mvn_settings_xml_version}'
-          description: Commit ID of ONAP Oparent repository (https://git.onap.org/oparent/) to pull. Used for Maven settings file. Can be left blank to pull the latest version.
-      - string:
-          name: MVN_PARAMS
-          default: '{mvn_params}'
-          description: Maven build parameters
-      - string:
-          name: SUBDIRECTORY
-          default: '{subdirectory}'
-          description: Subdirectory of the workspace for which the pom.xml will be called. This allows the verify to be called against a specific directory
+      - nordix-onap-java-build-parameters
+
     scm:
       - git-scm-gerrit:
           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
       - shell:
           !include-raw-escape: ./verify-jobs.sh
 
+- job-template:
+    name: 'onap-{project-name}-{stream}-time-trigger-java'
+    disabled_job_var: false
+    node: onap-ubuntu1804
+
+    disabled: '{obj:disabled_job_var}'
+    concurrent: true
+    mvn_settings_xml_version:
+    mvn_params:
+    mvn_version: 3.5.4
+    subdirectory:
+    properties:
+      - logrotate
+
+    parameters:
+      - project-parameters:
+          project: 'onap/{project}'
+          branch: '{branch}'
+      - nordix-gerrit-parameters
+      - nordix-onap-java-build-parameters
+
+    scm:
+      - git-scm-gerrit:
+          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
+          branch: '{branch}'
+          refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
+
+    triggers:
+      - timed: '{timer}'
+
+    wrappers:
+      - build-timeout:
+          timeout: 45
+
+    builders:
+      - shell:
+          !include-raw-escape: ./verify-jobs.sh
+
 # csits for diferent projects are different so need to have special handling
 - job-template:
     name: 'onap-policy-docker-{stream}-csit-java'