--- /dev/null
+#
+# 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.
+#
</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>
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