summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lucas <jflucas@research.att.com>2019-07-24 17:45:01 -0400
committerJack Lucas <jflucas@research.att.com>2019-07-24 18:53:03 -0400
commitffb4c7176c449c96a4bdbb43aa5a0c86e0aafdd4 (patch)
treee220469831d4c447707e439f8ef5109943965705
parent567e399803a759e40c6a7d378bb517da4c5cd556 (diff)
Fix bad types file download
Use the curl -L option to follow redirects and the -f option to cause curl to fail (and stop the Docker image build) if it does not successfully retrieve a file Issue-ID: DCAEGEN2-1685 Change-Id: If8fd872e036ed5bc48656f8ca6853c297c6ac135 Signed-off-by: Jack Lucas <jflucas@research.att.com>
-rw-r--r--cm-container/Dockerfile-template4
-rw-r--r--cm-container/pom.xml2
-rwxr-xr-xcm-container/scripts/get-type-files.sh4
3 files changed, 5 insertions, 5 deletions
diff --git a/cm-container/Dockerfile-template b/cm-container/Dockerfile-template
index 90835cc..b392e92 100644
--- a/cm-container/Dockerfile-template
+++ b/cm-container/Dockerfile-template
@@ -30,7 +30,7 @@ COPY scripts/* scripts/
# Setup rc.local to set up k8s credentials for CM
RUN scripts/get-type-files.sh ${TYPE_REPO} ${CCSDK_REPO}\
&& mkdir /opt/manager/resources/spec/cloudify/3.4\
- && curl -Ss https://cloudify.co/spec/cloudify/3.4/types.yaml > /opt/manager/resources/spec/cloudify/3.4/types.yaml\
+ && curl -Ss -L -f https://getcloudify.org/spec/cloudify/3.4/types.yaml > /opt/manager/resources/spec/cloudify/3.4/types.yaml\
&& chown -R cfyuser:cfyuser /opt/manager/resources/spec/cloudify/3.4\
&& chmod +x scripts/*.sh\
&& /scripts/configure-tls.sh\
@@ -41,7 +41,7 @@ RUN scripts/get-type-files.sh ${TYPE_REPO} ${CCSDK_REPO}\
RUN mkdir -p /opt/onap && chown cfyuser:cfyuser /opt/onap
# Install jq (used for cleanup--parsing output of CM API call)
-RUN curl -Ss -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \
+RUN curl -Ss -L -f "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" > /bin/jq \
&& chmod +x /bin/jq
CMD ["/scripts/start-persistent.sh"]
diff --git a/cm-container/pom.xml b/cm-container/pom.xml
index e13083d..f59c66c 100644
--- a/cm-container/pom.xml
+++ b/cm-container/pom.xml
@@ -27,7 +27,7 @@ limitations under the License.
<groupId>org.onap.dcaegen2.deployments</groupId>
<artifactId>cm-container</artifactId>
<name>dcaegen2-deployments-cm-container</name>
- <version>2.0.1</version>
+ <version>2.0.2</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/cm-container/scripts/get-type-files.sh b/cm-container/scripts/get-type-files.sh
index aa50bb7..067f45c 100755
--- a/cm-container/scripts/get-type-files.sh
+++ b/cm-container/scripts/get-type-files.sh
@@ -49,13 +49,13 @@ mkdir ${DEST}
for typefile in ${DCAETYPEFILES}
do
mkdir -p ${DEST}/$(dirname ${typefile})
- curl -Ss $1/${typefile} >> ${DEST}/${typefile}
+ curl -Ss -L -f $1/${typefile} >> ${DEST}/${typefile}
done
for typefile in ${CCSDKTYPEFILES}
do
mkdir -p ${DEST}/$(dirname ${typefile})
- curl -Ss $2/${typefile} >> ${DEST}/${typefile}
+ curl -Ss -L -f $2/${typefile} >> ${DEST}/${typefile}
done
chown cfyuser:cfyuser ${DEST}