From e9e3d91fdbe4f1ee425c3d33a89c63906ad37841 Mon Sep 17 00:00:00 2001 From: Lusheng Ji Date: Tue, 22 Aug 2017 21:30:08 -0700 Subject: initial files for seedcode push Change-Id: If280660d0ffab2709aecc20e8a71e8fbd38f28c6 Issue-Id: DCAEGEN2-73 Signed-off-by: Lusheng Ji --- .gitreview | 4 + LICENSE.txt | 31 ++++++ mvn-phase-script.sh | 50 +++++++++ pom.xml | 286 ++++++++++++++++++++++++++++++++++++++++++++++++++++ version.properties | 6 ++ 5 files changed, 377 insertions(+) create mode 100644 .gitreview create mode 100644 LICENSE.txt create mode 100755 mvn-phase-script.sh create mode 100644 pom.xml create mode 100644 version.properties diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..bff929e --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.onap.org +port=29418 +project=dcaegen2/analytics.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..7c1e63a --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,31 @@ +============LICENSE_START======================================================= +org.onap.dcae +================================================================================ +Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +================================================================================ +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. +============LICENSE_END========================================================= + +ECOMP is a trademark and service mark of AT&T Intellectual Property. + +Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +=================================================================== +Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); +you may not use this documentation except in compliance with the License. +You may obtain a copy of the License at + https://creativecommons.org/licenses/by/4.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. diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh new file mode 100755 index 0000000..904c74a --- /dev/null +++ b/mvn-phase-script.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +echo "running script: [$0] for module [$1] at stage [$2]" + +echo "=> Prepare environment " +#env + +TIMESTAMP=$(date +%C%y%m%dT%H%M%S) +export BUILD_NUMBER="${TIMESTAMP}" + +# expected environment variables +if [ -z "${MVN_NEXUSPROXY}" ]; then + echo "MVN_NEXUSPROXY environment variable not set. Cannot proceed" + exit +fi +MVN_NEXUSPROXY_HOST=$(echo $MVN_NEXUSPROXY |cut -f3 -d'/' | cut -f1 -d':') + + +# use the version text detect which phase we are in in LF CICD process: verify, merge, or (daily) release + +# mvn phase in life cycle +MVN_PHASE="$2" + +case $MVN_PHASE in +clean) + echo "==> clean phase script" + ;; +generate-sources) + echo "==> generate-sources phase script" + ;; +compile) + echo "==> compile phase script" + ;; +test) + echo "==> test phase script" + ;; +package) + echo "==> package phase script" + ;; +install) + echo "==> install phase script" + ;; +deploy) + echo "==> deploy phase script" + ;; +*) + echo "==> unprocessed phase" + ;; +esac + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fdff1c7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,286 @@ + + + 4.0.0 + + org.onap.oparent + oparent + 1.0.0-SNAPSHOT + + + + + org.onap.dcaegen2 + analytics + analytics + + 1.0.0-SNAPSHOT + http://maven.apache.org + + UTF-8 + . + + http://localhost:9000 + + + py + Python + **/*.py + + + + + + ${project.artifactId}-${project.version} + + + + org.codehaus.mojo + sonar-maven-plugin + 2.7.1 + + + + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.6 + + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + true + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + + default-jar + + + + + + + + org.apache.maven.plugins + maven-install-plugin + 2.4 + + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + clean phase script + clean + exec + + ${session.executionRootDirectory}/mvn-phase-script.sh + + ${project.artifactId} + clean + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + generate-sources script + generate-sources + exec + + mvn-phase-script.sh + + ${project.artifactId} + generate-sources + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + compile script + compile + exec + + mvn-phase-script.sh + + ${project.artifactId} + compile + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + package script + package + exec + + mvn-phase-script.sh + + ${project.artifactId} + package + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + test script + test + exec + + mvn-phase-script.sh + + ${project.artifactId} + test + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + install script + install + exec + + mvn-phase-script.sh + + ${project.artifactId} + install + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + deploy script + deploy + exec + + mvn-phase-script.sh + + ${project.artifactId} + deploy + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + + + + + + + + + diff --git a/version.properties b/version.properties new file mode 100644 index 0000000..73415a7 --- /dev/null +++ b/version.properties @@ -0,0 +1,6 @@ +major=1 +minor=1 +patch=0 +base_version=${major}.${minor}.${patch} +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg