Allow mvn parameters to be set in verify jobs
default should be ""
and overridden for sdc-verify
Change-Id: If25a286728ff3cfcb2a6f670225b09d1e31b564c
Signed-off-by: afenner <andrew.fenner@est.tech>
diff --git a/jjb/onap/global-templates-local-onap-java.yaml b/jjb/onap/global-templates-local-onap-java.yaml
index 0cc83b9..5f2fafb 100644
--- a/jjb/onap/global-templates-local-onap-java.yaml
+++ b/jjb/onap/global-templates-local-onap-java.yaml
@@ -1,6 +1,6 @@
---
# This is a separate java verify template for the local ONAP repositories
-# that are not push to ONAP upstream.
+# that are not push to ONAP upstream.
- job-template:
name: 'local-onap-{project-name}-{stream}-verify-java'
disabled_job_var: false
@@ -9,6 +9,7 @@
disabled: '{obj:disabled_job_var}'
concurrent: true
mvn_settings_xml_version:
+ mvn_params:
properties:
- logrotate
@@ -37,7 +38,10 @@
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
scm:
- git-scm-gerrit:
ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
diff --git a/jjb/onap/global-templates-onap-java.yaml b/jjb/onap/global-templates-onap-java.yaml
index f2fab41..b288735 100644
--- a/jjb/onap/global-templates-onap-java.yaml
+++ b/jjb/onap/global-templates-onap-java.yaml
@@ -6,6 +6,7 @@
disabled: '{obj:disabled_job_var}'
concurrent: true
mvn_settings_xml_version:
+ mvn_params:
properties:
- logrotate
@@ -34,7 +35,10 @@
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
scm:
- git-scm-gerrit:
ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
diff --git a/jjb/onap/sdc/sdc-verify-jobs.yaml b/jjb/onap/sdc/sdc-verify-jobs.yaml
index 2c003ef..74b3a52 100644
--- a/jjb/onap/sdc/sdc-verify-jobs.yaml
+++ b/jjb/onap/sdc/sdc-verify-jobs.yaml
@@ -24,7 +24,7 @@
name: sdc-verify
project: sdc
project-name: sdc
-
+ mvn_params: "-Pfast-build -Djacoco.skip=true -DskipPMD -Dcheckstyle.skip"
stream:
- 'master':
branch: '{stream}'
diff --git a/jjb/onap/verify-jobs.sh b/jjb/onap/verify-jobs.sh
index b07f82d..4f8d9f6 100755
--- a/jjb/onap/verify-jobs.sh
+++ b/jjb/onap/verify-jobs.sh
@@ -27,6 +27,15 @@
git checkout "${MVN_SETTINGS_XML_VERSION}"
fi
set -o nounset
+
+# if MVN_PARAMS set then use them otherwise default to ""
+LOCAL_MVN_PARAMS=""
+set +o nounset
+if [[ -n ${MVN_PARAMS} ]]; then
+ LOCAL_MVN_PARAMS=${MVN_PARAMS}
+fi
+set -o nounset
+
# Copy Onap maven settings.xml to Jenkins home directory
if [ ! -d /home/jenkins/.m2 ]; then
mkdir -p /home/jenkins/.m2/
@@ -36,4 +45,4 @@
echo "----------------------------------------------------"
echo "Proceeding with unit test"
echo "----------------------------------------------------"
-$MVN clean install -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
\ No newline at end of file
+$MVN clean install -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn $LOCAL_MVN_PARAMS