update policy verify to include csit 02/18802/1
authorafenner <Andrew.fenner@est.tech>
Wed, 12 Jul 2023 08:17:45 +0000 (09:17 +0100)
committerafenner <Andrew.fenner@est.tech>
Wed, 12 Jul 2023 08:18:11 +0000 (09:18 +0100)
just for policy clamp for now

Change-Id: I0400337eab7e52628b88738dd753a626335ed6b5
Signed-off-by: afenner <Andrew.fenner@est.tech>
jjb/onap/global-templates-onap-java.yaml
jjb/onap/policy-clamp/policy-clamp-verify-jobs.yaml
jjb/onap/verify-policy-csit.sh [new file with mode: 0755]

index 439038bc2c0d53b43e49defecb71e2f4426f301e..8902f57adb815d8da52427b0394cecf08068fa32 100644 (file)
       - shell:
           !include-raw-escape: ./verify-jobs.sh
 
+# A job to perform CSIT on policy components 
+- job-template:
+    name: 'onap-{project-name}-{stream}-policy-csit-verify-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
+      - 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: CSIT_NAME
+          default: '{csit-name}'
+          description: The name of the csit-test to run          
+      - 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
+
+    scm:
+      - git-scm-gerrit:
+          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
+          branch: '{branch}'
+          refspec: $GERRIT_REFSPEC
+          wipe_workspace: true
+          clean_before: false
+
+    triggers:
+      - nordix-gerrit-trigger-patchset-created:
+          project: 'onap/{project}'
+          branch: '{branch}'
+          files: '**'
+
+    wrappers:
+      - build-timeout:
+          timeout: 45
+
+    builders:
+      - shell:
+          !include-raw-escape: ./verify-jobs.sh
+      - shell:
+          !include-raw-escape: ./verify-policy-csit.sh
 - job-template:
     name: 'onap-{project-name}-{stream}-performance-test-java'
     disabled_job_var: false
       - 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'
index ca0ebdc18c11d5a0c1ddbb585c73fbb392c7d0c2..dec6f1f6da1b6809ea26a8baf7fdd52c55a18288 100644 (file)
@@ -25,7 +25,8 @@
     name: policy-clamp-verify
     project: policy/clamp
     project-name: policy-clamp
-
+    csit-name: clamp
+    mvn_params: "-Pdocker"
     stream:
       - 'master':
           branch: '{stream}'
@@ -37,4 +38,4 @@
           branch: '{stream}'
           jdk-version: java-11
     jobs:
-      - 'onap-{project-name}-{stream}-verify-java'
+      - 'onap-{project-name}-{stream}-policy-csit-verify-java'
diff --git a/jjb/onap/verify-policy-csit.sh b/jjb/onap/verify-policy-csit.sh
new file mode 100755 (executable)
index 0000000..f7a8635
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+cd $WORKSPACE
+echo "Info: Clone policy docker to get acces to csit execution"
+git clone "https://gerrit.nordix.org/onap/policy/docker" csitdocker
+cd csitdocker
+echo "check what images are available"
+docker images
+export WORKSPACE=$PWD
+echo "run the tests for $CSIT_NAME" 
+csit/run-k8s-csit.sh install $CSIT_NAME true