From 8d2bf807b96faddd1e1069d1eb45b679494afd4e Mon Sep 17 00:00:00 2001 From: "robert.tomczyk" Date: Fri, 15 Nov 2019 14:25:34 +0000 Subject: [PATCH] ORANSC: Add java verify for nonrtric Change-Id: Ie4fce9e75e7e68889aef4941ea2f7491b8c4b3e3 --- jjb/oransc/global-templates-oran-java.yaml | 53 +++++++++++++++++++ jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml | 27 ++++++++++ jjb/oransc/verify-jobs.sh | 19 +++++++ 3 files changed, 99 insertions(+) create mode 100644 jjb/oransc/global-templates-oran-java.yaml create mode 100644 jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml create mode 100755 jjb/oransc/verify-jobs.sh diff --git a/jjb/oransc/global-templates-oran-java.yaml b/jjb/oransc/global-templates-oran-java.yaml new file mode 100644 index 00000000..8a0fa35f --- /dev/null +++ b/jjb/oransc/global-templates-oran-java.yaml @@ -0,0 +1,53 @@ +- job-template: + name: 'oransc-{project-name}-verify-java' + node: oransc-ubuntu1804 + disabled: false + concurrent: true + + properties: + - logrotate + + parameters: + - nordix-gerrit-parameters + - string: + name: PROJECT + default: 'oransc/{project}' + description: JJB configured PROJECT parameter to identify a Nordix Gerrit project + - string: + name: JAVA_HOME + default: '/usr/lib/jvm/{jdk-version}-openjdk-amd64' + description: Java home + - string: + name: MVN_VERSION + default: 3.6.2 + 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 + + scm: + - git-scm-gerrit: + ssh-credentials-id: nordixinfra-nordix-gerrit-ssh + branch: $GERRIT_BRANCH + refspec: $GERRIT_REFSPEC + wipe_workspace: true + clean_before: false + + triggers: + - nordix-gerrit-trigger-patchset-created: + project: 'oransc/{project}' + branch: '**' + files: '**' + + wrappers: + - build-timeout: + timeout: 45 + + builders: + - shell: + !include-raw-escape: ./verify-jobs.sh diff --git a/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml b/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml new file mode 100644 index 00000000..0de7b41b --- /dev/null +++ b/jjb/oransc/nonrtric/nonrtric-verify-jobs.yaml @@ -0,0 +1,27 @@ +--- +# ============LICENSE_START==================================================== +# Copyright (C) 2019 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====================================================== + +- project: + name: nonrtric-rebase-verify + project: nonrtric + project-name: nonrtric + jdk-version: java-11 + + jobs: + - 'oransc-{project-name}-verify-java' diff --git a/jjb/oransc/verify-jobs.sh b/jjb/oransc/verify-jobs.sh new file mode 100755 index 00000000..b9af93be --- /dev/null +++ b/jjb/oransc/verify-jobs.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +cd ${WORKSPACE} +echo "Info: Java version" +echo "----------------------------------------------------" +${JAVA_HOME}/bin/java -version +echo "----------------------------------------------------" +echo "Downloading Maven $MVN_VERSION from $MVN_URL" +wget -q $MVN_URL && unzip -qq apache-maven-${MVN_VERSION}-bin.zip +echo "Info: Maven version" +echo "----------------------------------------------------" +${MVN} -version +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 -- 2.25.1