From: liboNet Date: Tue, 19 Mar 2019 19:10:03 +0000 (+0800) Subject: add submodule support in framework X-Git-Tag: 1.3.0~23 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=multicloud%2Fframework.git;a=commitdiff_plain;h=efb2229057ed70b0dd46c1e4fdfb8462727cef03 add submodule support in framework support multi broker and fix sonar.sh issue . add a new module of artifact broker . update framework pom.xml to support submodules . update the multivim broker to align with the case like subplugins under openstack . remove the duplicated sonar.sh Change-Id: Ie41dc07aed9e015208e79aadff204747269af638 Issue-ID: MULTICLOUD-532 Signed-off-by: liboNet --- diff --git a/artifactbroker/README.md b/artifactbroker/README.md new file mode 100644 index 0000000..6274024 --- /dev/null +++ b/artifactbroker/README.md @@ -0,0 +1,13 @@ +# Copyright (c) 2017 Wind River Systems, Inc. +# Copyright (c) 2017-2018 VMware, Inc. +# +# 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. + +# Micro service of broker for multiple VIM instance drivers. diff --git a/artifactbroker/pom.xml b/artifactbroker/pom.xml new file mode 100644 index 0000000..a49dbc4 --- /dev/null +++ b/artifactbroker/pom.xml @@ -0,0 +1,36 @@ + + + + + org.onap.multicloud.framework + multicloud-framework + 1.3.0-SNAPSHOT + + 4.0.0 + org.onap.multicloud.framework.broker + multicloud-framework-artifact-broker + 1.3.0-SNAPSHOT + pom + multicloud-framework-artifact-broker + artifact broker + + UTF-8 + UTF-8 + UTF-8 + https://nexus.onap.org + + diff --git a/multivimbroker/pom.xml b/multivimbroker/pom.xml index ef627af..d9da20a 100644 --- a/multivimbroker/pom.xml +++ b/multivimbroker/pom.xml @@ -34,25 +34,76 @@ https://nexus.onap.org + - maven-assembly-plugin - - false - - assembly.xml - - - - - make-assembly - package - - single - - - + org.codehaus.mojo + exec-maven-plugin + 1.1.1 + + ${project.basedir}/sonar.sh + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.1.1 + + + clean phase script + clean + + exec + + + + __ + clean + + + + + test script + test + + exec + + + + __ + test + + + + + + + maven-assembly-plugin + + false + + assembly.xml + + + + + make-assembly + package + + single + + + + + diff --git a/multivimbroker/sonar.sh b/multivimbroker/sonar.sh index e173d1f..41cc450 100755 --- a/multivimbroker/sonar.sh +++ b/multivimbroker/sonar.sh @@ -56,7 +56,7 @@ run_tox_test() pip install --upgrade pip pip install --upgrade tox argparse pip freeze - cd multivimbroker + cd ${CURDIR} tox -e cover deactivate cd .. diff --git a/pom.xml b/pom.xml index 51e32db..866ab9b 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ 1.3.0-SNAPSHOT pom multicloud-framework - multivim broker + multicloud broker UTF-8 . @@ -38,58 +38,9 @@ **/*.py tests/*,setup.py - - - - - org.codehaus.mojo - exec-maven-plugin - 1.1.1 - - ${session.executionRootDirectory}/sonar.sh - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.1.1 - - - clean phase script - clean - - exec - - - - __ - clean - - - - - test script - test - - exec - - - - __ - test - - - - - - - + + multivimbroker + artifactbroker + + + diff --git a/sonar.sh b/sonar.sh deleted file mode 100755 index d23d18d..0000000 --- a/sonar.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# Copyright 2018 VMware Corporation. -# -# 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. - - -set -e - -echo "running script: [$0] for module [$1] at stage [$2]" - -export SETTINGS_FILE=${SETTINGS_FILE:-$HOME/.m2/settings.xml} -MVN_PROJECT_MODULEID="$1" -MVN_PHASE="$2" - - -FQDN="${MVN_PROJECT_GROUPID}.${MVN_PROJECT_ARTIFACTID}" -if [ "$MVN_PROJECT_MODULEID" == "__" ]; then - MVN_PROJECT_MODULEID="" -fi - -if [ -z "$WORKSPACE" ]; then - WORKSPACE=$(pwd) -fi - -# mvn phase in life cycle -MVN_PHASE="$2" - - -echo "MVN_PROJECT_MODULEID is [$MVN_PROJECT_MODULEID]" -echo "MVN_PHASE is [$MVN_PHASE]" -echo "MVN_PROJECT_GROUPID is [$MVN_PROJECT_GROUPID]" -echo "MVN_PROJECT_ARTIFACTID is [$MVN_PROJECT_ARTIFACTID]" -echo "MVN_PROJECT_VERSION is [$MVN_PROJECT_VERSION]" - -run_tox_test() -{ - set -x - CURDIR=$(pwd) - TOXINIS=$(find . -name "tox.ini") - for TOXINI in "${TOXINIS[@]}"; do - DIR=$(echo "$TOXINI" | rev | cut -f2- -d'/' | rev) - cd "${CURDIR}/${DIR}" - rm -rf ./venv-tox ./.tox - virtualenv ./venv-tox - source ./venv-tox/bin/activate - pip install --upgrade pip - pip install --upgrade tox argparse - pip freeze - cd multivimbroker - tox -e cover - tox -e rstcheck - deactivate - cd .. - rm -rf ./venv-tox ./.tox - done -} - - -case $MVN_PHASE in -clean) - echo "==> clean phase script" - rm -rf ./venv-* - ;; -test) - echo "==> test phase script" - run_tox_test - ;; -*) - echo "==> unprocessed phase" - ;; -esac -