Fix has docker build to conform to self-release 76/104176/1
authorvrvarma <vikas.varma@att.com>
Mon, 23 Mar 2020 16:42:03 +0000 (12:42 -0400)
committervrvarma <vikas.varma@att.com>
Mon, 23 Mar 2020 16:42:20 +0000 (12:42 -0400)
Change-Id: I27671db832cb85517bd7f7a0c587a9a02c2eec61
Signed-off-by: vrvarma <vikas.varma@att.com>
Issue-ID: OPTFRA-722

conductor/docker/Dockerfile
conductor/docker/assembly/has-files.xml [new file with mode: 0644]
conductor/pom.xml

index 9af6c23..c0c949b 100644 (file)
@@ -47,9 +47,12 @@ RUN pip install --upgrade pip
 RUN apk add --virtual build-dependencies build-base linux-headers pcre-dev libffi-dev libxslt-dev libressl-dev
 RUN pip install uwsgi
 
-RUN wget -O /opt/has.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.optf.has&a=optf-has-conductor&e=zip&v=${MVN_ARTIFACT_VERSION}" && \
-    unzip -q -o -B /opt/has.zip -d /opt/has && \
-    rm -f /opt/has.zip
+#RUN wget -O /opt/has.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.optf.has&a=optf-has-conductor&e=zip&v=${MVN_ARTIFACT_VERSION}" && \
+#    unzip -q -o -B /opt/has.zip -d /opt/has && \
+#    rm -f /opt/has.zip
+
+COPY onap-has-tm/optf-has-conductor-${MVN_ARTIFACT_VERSION}.zip /tmp/optf-has.zip
+RUN unzip -q -o -B /tmp/optf-has.zip -d /opt/has && rm -f /tmp/optf-has.zip
 
 #PKG-INFO file must also exists in the conductor folder (i.e. besides and inside the of_has.egg-info folder). The zip file for distro above is missing it
 RUN cp /opt/has/conductor/of_has.egg-info/PKG-INFO /opt/has/conductor
diff --git a/conductor/docker/assembly/has-files.xml b/conductor/docker/assembly/has-files.xml
new file mode 100644 (file)
index 0000000..9590740
--- /dev/null
@@ -0,0 +1,56 @@
+<!--
+       Copyright (C) 2019 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.
+
+-->
+
+<!--
+    Copyright (c) 2018 Intel Corporation. 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.
+-->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+       <id>has-files</id>
+
+       <formats>
+               <format>tar.gz</format>
+       </formats>
+       <includeBaseDirectory>false</includeBaseDirectory>
+
+
+       <fileSets>
+               <fileSet>
+                       <includes>
+                               <include>${project.build.finalName}.zip</include>
+                       </includes>
+                       <directory>${project.build.directory}</directory>
+                       <outputDirectory>/</outputDirectory>
+               </fileSet>
+
+       </fileSets>
+</assembly>
index 5851f63..ccfbc81 100644 (file)
                                                                </tags>
 
                                                                <dockerFile>${project.basedir}/docker/Dockerfile</dockerFile>
+                                                               <assembly>
+                                                                       <descriptor>${project.basedir}/docker/assembly/has-files.xml</descriptor>
+                                                                       <name>onap-has-tm</name>
+                                                               </assembly>
                                                                <args>
                                                                        <MVN_ARTIFACT_VERSION>${project.version}</MVN_ARTIFACT_VERSION>
                                                                        <REPO>${project.repo}</REPO>