[SDC] 1710 rebase 93/6193/1
authorMichael Lando <ml636r@att.com>
Mon, 24 Jul 2017 20:21:12 +0000 (23:21 +0300)
committerMichael Lando <ml636r@att.com>
Mon, 24 Jul 2017 20:21:12 +0000 (23:21 +0300)
Change-Id: I119765d0a74f05722fc19586338fa49fd467095e
Signed-off-by: Michael Lando <ml636r@att.com>
.gitignore
asdctool/src/main/resources/config/license.txt [new file with mode: 0644]
asdctool/tarball.xml
catalog-be/pom.xml
sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/07-importComformance.rb

index 3ad4296..f27a944 100644 (file)
@@ -151,3 +151,5 @@ node/*
 .delivery
 
 common/openecomp-sdc-artifact-generator-lib/openecomp-sdc-artifact-generator-core/logs/*
+
+/asdctool/tosca/*
diff --git a/asdctool/src/main/resources/config/license.txt b/asdctool/src/main/resources/config/license.txt
new file mode 100644 (file)
index 0000000..0a4f362
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# 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.
+#
index 7dde4d6..0734658 100644 (file)
@@ -22,5 +22,9 @@
             <directory>src/main/resources/config</directory>
             <outputDirectory>config</outputDirectory>
         </fileSet>
+        <fileSet>
+            <directory>tosca</directory>
+            <outputDirectory>tosca</outputDirectory>
+        </fileSet>
     </fileSets>
 </assembly>
\ No newline at end of file
index 963bcf9..87f4011 100644 (file)
                                </executions>
                        </plugin>
 
-                       <plugin>
-                               <artifactId>maven-clean-plugin</artifactId>
-                               <version>2.6.1</version>
-                               <executions>
-                                       <execution>
-                                               <id>clean.sdc.zip.chef.os.folder</id>
-                                               <phase>initialize</phase>
-                                               <goals>
-                                                       <goal>clean</goal>
-                                               </goals>
-                                               <configuration>
-
-                                                       <filesets>
-                                                               <fileset>
-                                                                       <directory>${project.parent.basedir}/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/sdc-*.zip</directory>
-                                                                       <includes>
-                                                                               <include>sdc-*.zip</include>
-                                                                       </includes>
-                                                                       <followSymlinks>false</followSymlinks>
-                                                               </fileset>
-                                                       </filesets>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
                        <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
                                <version>2.6</version>
                                                        </resources>
                                                </configuration>
                                        </execution>
+                               <execution>
+                               <id>copy.tosca.folder.to.os.chef</id>
+                               <!-- here the phase you need -->
+                               <phase>install</phase>
+                               <goals>
+                                       <goal>copy-resources</goal>
+                               </goals>
+                               <configuration>
+                                       <outputDirectory>${project.parent.basedir}/asdctool/tosca</outputDirectory>
+                                       <resources>          
+                                               <resource>
+                                                       <directory>${project.parent.basedir}/catalog-be/src/main/resources/import/tosca</directory>
+                                                       <filtering>true</filtering>
+                                               </resource>
+                                       </resources>              
+                               </configuration>            
+                               </execution>
                                </executions>
                        </plugin>
 
                        <plugin>
-                               <groupId>com.coderplus.maven.plugins</groupId>
-                               <artifactId>copy-rename-maven-plugin</artifactId>
-                               <version>1.0</version>
+                               <artifactId>maven-clean-plugin</artifactId>
+                               <version>3.0.0</version>
                                <executions>
                                        <execution>
-                                               <id>copy-file</id>
-                                               <phase>install</phase>
-                                               <goals>
-                                                       <goal>copy</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <sourceFile>${project.parent.basedir}/catalog-be/src/main/resources/config/SDC.zip</sourceFile>
-                                                       <destinationFile>${project.parent.basedir}/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/SDC.zip</destinationFile>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>rename-file</id>
-                                               <phase>install</phase>
+                                               <id>clean.tosca.chef.os.folder</id>
+                                               <phase>clean</phase>
                                                <goals>
-                                                       <goal>rename</goal>
+                                                       <goal>clean</goal>
                                                </goals>
                                                <configuration>
-                                                       <sourceFile>${project.parent.basedir}/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/SDC.zip</sourceFile>
-                                                       <destinationFile>${project.parent.basedir}/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/SDC-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.zip</destinationFile>
+
+                                                       <filesets>
+                                                               <fileset>
+                                                                       <directory>${project.parent.basedir}/asdctool/tosca</directory>
+                                                                       <followSymlinks>false</followSymlinks>
+                                                               </fileset>
+                                                       </filesets>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
 
-
-
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-assembly-plugin</artifactId>
index 4a04a9b..c6ff148 100644 (file)
@@ -13,22 +13,19 @@ bash "extract sdctool.tar" do
   EOH
 end
 
-cookbook_file "/tmp/sdctool/config/SDC.zip" do
-   source "SDC-#{cl_release}.zip"
-end
 
 bash "import-Comformance" do
   cwd "#{working_directory}"
   code <<-EOH
     conf_dir=/tmp/sdctool/config
-    schema_file_name=SDC.zip
+    tosca_dir=/tmp/sdctool/tosca
 
     cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'`
 
     cd /tmp/sdctool/scripts
     /bin/chmod +x sdcSchemaFileImport.sh
-    echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh $conf_dir/$schema_file_name #{cl_release} ${cl_version} ${conf_dir} "
-    ./sdcSchemaFileImport.sh ${conf_dir}/${schema_file_name} #{cl_release} ${cl_version} ${conf_dir} 
+    echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} "
+    ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} 
   EOH
 end