From 477ca0fdf4b4d6982bd0326ecbad3ff6d0ff4a66 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 27 Mar 2019 09:40:03 +0100 Subject: [PATCH] Add verify jobs for mirrored Acumos projects This change adds globals for Acumos due to lack of namespacing imported projects. Using Acumos globals, verify jobs are created for portal-marketplace and security-verification repos. Change-Id: I53c1c4fc14c521732d3229a7116bfa3b2ddfb108 --- jjb/acumos/global-templates-acumos-java.yaml | 53 +++++++++++++++++++ .../portal-marketplace-verify-jobs.yaml | 30 +++++++++++ .../security-verification-verify-jobs.yaml | 30 +++++++++++ jjb/acumos/verify-jobs.sh | 19 +++++++ 4 files changed, 132 insertions(+) create mode 100644 jjb/acumos/global-templates-acumos-java.yaml create mode 100644 jjb/acumos/portal-marketplace/portal-marketplace-verify-jobs.yaml create mode 100644 jjb/acumos/security-verification/security-verification-verify-jobs.yaml create mode 100755 jjb/acumos/verify-jobs.sh diff --git a/jjb/acumos/global-templates-acumos-java.yaml b/jjb/acumos/global-templates-acumos-java.yaml new file mode 100644 index 000000000..80344fda9 --- /dev/null +++ b/jjb/acumos/global-templates-acumos-java.yaml @@ -0,0 +1,53 @@ +- job-template: + name: 'acumos-{project-name}-{stream}-verify-java' + + node: acumos-ubuntu1604 + + disabled: false + + concurrent: true + + properties: + - logrotate + + parameters: + - project-parameters: + project: 'acumos/{project}' + branch: '{branch}' + - nordix-gerrit-parameters + - string: + name: JAVA_HOME + default: /usr/lib/jvm/java-1.8.0-openjdk-amd64 + description: Java home + - string: + name: MVN_VERSION + default: 3.3.9 + 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: '{branch}' + refspec: $GERRIT_REFSPEC + + triggers: + - nordix-gerrit-trigger-patchset-created: + project: 'acumos/{project}' + branch: '{branch}' + files: '**' + + wrappers: + - build-timeout: + timeout: 45 + + builders: + - shell: + !include-raw-escape: ./verify-jobs.sh diff --git a/jjb/acumos/portal-marketplace/portal-marketplace-verify-jobs.yaml b/jjb/acumos/portal-marketplace/portal-marketplace-verify-jobs.yaml new file mode 100644 index 000000000..f48fe83a3 --- /dev/null +++ b/jjb/acumos/portal-marketplace/portal-marketplace-verify-jobs.yaml @@ -0,0 +1,30 @@ +--- +# ============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: portal-marketplace-verify + project: portal-marketplace + project-name: portal-marketplace + + stream: + - master: + branch: '{stream}' + + jobs: + - 'acumos-{project-name}-{stream}-verify-java' diff --git a/jjb/acumos/security-verification/security-verification-verify-jobs.yaml b/jjb/acumos/security-verification/security-verification-verify-jobs.yaml new file mode 100644 index 000000000..1cf609df2 --- /dev/null +++ b/jjb/acumos/security-verification/security-verification-verify-jobs.yaml @@ -0,0 +1,30 @@ +--- +# ============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: security-verification-verify + project: security-verification + project-name: security-verification + + stream: + - master: + branch: '{stream}' + + jobs: + - 'acumos-{project-name}-{stream}-verify-java' diff --git a/jjb/acumos/verify-jobs.sh b/jjb/acumos/verify-jobs.sh new file mode 100755 index 000000000..2ffc1d2b2 --- /dev/null +++ b/jjb/acumos/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 -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