From: robert.tomczyk Date: Fri, 15 Nov 2019 14:25:34 +0000 (+0000) Subject: ORANSC: Add java verify for nonrtric X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F2913%2F2;p=infra%2Fcicd.git ORANSC: Add java verify for nonrtric Change-Id: Ie4fce9e75e7e68889aef4941ea2f7491b8c4b3e3 --- 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