From: Hong Guan Date: Wed, 8 Aug 2018 21:50:28 +0000 (-0400) Subject: Add Helm Plugin maven build X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=72e2ba6f74c73a3bfbc4a438036ea9d8c7679612;p=ccsdk%2Fplatform%2Fplugins.git Add Helm Plugin maven build Change-Id: I111db7511658bfff73e85cf9efed69e1a4e44713 Issue-ID: CCSDK-392 Signed-off-by: Hong Guan --- diff --git a/helm/helm-type.yaml b/helm/helm-type.yaml index 6645620..c8d329c 100644 --- a/helm/helm-type.yaml +++ b/helm/helm-type.yaml @@ -18,8 +18,8 @@ plugins: helm-plugin: executor: central_deployment_agent - package_name: onap-helm-plugin - package_version: 2.3.0 + package_name: helm + package_version: 2.3.1 node_types: diff --git a/helm/plugin/tests/test_plugin.py b/helm/plugin/tests/test_plugin.py index 1b90aa0..864843f 100644 --- a/helm/plugin/tests/test_plugin.py +++ b/helm/plugin/tests/test_plugin.py @@ -34,8 +34,9 @@ class TestPlugin(unittest.TestCase): resources_to_copy=[(path.join('blueprint', 'plugin', 'test_plugin.yaml'), 'plugin')]) + @mock.patch('plugin.tasks.os.remove') @mock.patch('plugin.tasks.execute_command') - def test_stop(self, cfy_local, mock_execute_command): + def test_stop(self, cfy_local, mock_execute_command, mock_os_remove): # execute install workflow """ diff --git a/helm/pom.xml b/helm/pom.xml new file mode 100644 index 0000000..02f1860 --- /dev/null +++ b/helm/pom.xml @@ -0,0 +1,318 @@ + + + + 4.0.0 + + org.onap.ccsdk.platform + plugins + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.platform.plugins + helm + helm + + 1.0.1-SNAPSHOT + http://maven.apache.org + + + helm + + . + + helm_types.yaml + + type_files/helm/1.1.0/helm_types.yaml + UTF-8 + . + nosetests.xml + coverage.xml + py + Python + **/*.py + plugin/tests/*,setup.py + + + + ${project.artifactId}-${project.version} + + + + org.codehaus.mojo + sonar-maven-plugin + 2.7.1 + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + + true + + + + + + + + + + + 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} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + ${plugin.name} + ${plugin.subdir} + + + + + + generate-sources script + generate-sources + exec + + mvn-phase-script.sh + + ${project.artifactId} + generate-sources + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + + + + + + compile script + compile + exec + + mvn-phase-script.sh + + ${project.artifactId} + compile + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + + + + + + package script + package + exec + + mvn-phase-script.sh + + ${project.artifactId} + package + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + ${plugin.name} + ${plugin.subdir} + + + + + + test script + test + exec + + mvn-phase-script.sh + + ${project.artifactId} + test + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + ${plugin.name} + ${plugin.subdir} + + + + + + install script + install + exec + + mvn-phase-script.sh + + ${project.artifactId} + install + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + + + + + + deploy script + deploy + exec + + ${session.executionRootDirectory}/mvn-phase-script.sh + + ${project.artifactId} + deploy + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + ${onap.nexus.url} + ${onap.nexus.rawrepo.baseurl.upload} + ${onap.nexus.rawrepo.baseurl.download} + ${onap.nexus.rawrepo.serverid} + ${project.distributionManagement.snapshotRepository.id} + ${typefile.source} + ${typefile.dest} + ${plugin.name} + ${plugin.subdir} + + + + + + + + diff --git a/helm/setup.py b/helm/setup.py index c15d98e..8eb67f9 100644 --- a/helm/setup.py +++ b/helm/setup.py @@ -23,8 +23,8 @@ from setuptools import setup setup( # Do not use underscores in the plugin name. - name='onap-helm-plugin', - version='2.3.0', + name='helm', + version='2.3.1', author='Nicolas Hu(AT&T)', author_email='jh245g@att.com', description='This plugin will install/uninstall/upgrade/rollback helm ' diff --git a/helm/tox.ini b/helm/tox.ini index 14c340c..059a114 100644 --- a/helm/tox.ini +++ b/helm/tox.ini @@ -7,9 +7,14 @@ deps = # this fixes issue with tox installing coverage --pre coverage==3.7.1 nose-cov + mock testfixtures -rdev-requirements.txt -commands=nosetests --with-cov --cov-report term-missing --cov plugin plugin/tests +# commands=nosetests --with-cov --cov-report term-missing --cov plugin plugin/tests +commands=nosetests --with-xunit --with-cov --cov-report=xml --cov plugin plugin/tests + +[flake8] +ignore=E302,F401,E501,E712,F811,F841,E127,E128.W291 [testenv:flake8] deps = diff --git a/pom.xml b/pom.xml index bf28a1f..d25491f 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,7 @@ limitations under the License. sshkeyshare pgaas dnsdesig + helm UTF-8