summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tca-cdap-container/Dockerfile5
-rwxr-xr-xtca-cdap-container/get-tca.sh16
2 files changed, 19 insertions, 2 deletions
diff --git a/tca-cdap-container/Dockerfile b/tca-cdap-container/Dockerfile
index f5e70c8..2e4f8ca 100644
--- a/tca-cdap-container/Dockerfile
+++ b/tca-cdap-container/Dockerfile
@@ -17,8 +17,9 @@
FROM caskdata/cdap-standalone:4.1.2
RUN apt-get update
-RUN apt-get install -y netcat jq
-ADD https://nexus.onap.org/content/repositories/snapshots/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.2.0-SNAPSHOT/dcae-analytics-cdap-tca-2.2.0-20180320.190629-1.jar /opt/tca/dcae-analytics-cdap-tca-2.2.0.jar
+RUN apt-get install -y netcat jq wget
+COPY get-tca.sh /opt/tca/get-tca.sh
+RUN /opt/tca/get-tca.sh
COPY tca_app_config.json /opt/tca/tca_app_config.json
COPY tca_app_preferences.json /opt/tca/tca_app_preferences.json
COPY restart.sh /opt/tca/restart.sh
diff --git a/tca-cdap-container/get-tca.sh b/tca-cdap-container/get-tca.sh
new file mode 100755
index 0000000..2a9cf62
--- /dev/null
+++ b/tca-cdap-container/get-tca.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+PROTO='https'
+NEXUSREPO='nexus.onap.org'
+REPO='snapshots'
+GROUPID='org.onap.dcaegen2.analytics.tca'
+ARTIFACTID='dcae-analytics-tca'
+VERSION='2.2.0-SNAPSHOT'
+
+URL="${PROTO}://${NEXUSREPO}/service/local/repositories/${REPO}/content/${GROUPID//.//}/${ARTIFACTID}/${VERSION}/maven-metadata.xml"
+VT=$(wget --no-check-certificate -O- $URL | grep -m 1 \<value\> | sed -e 's/<value>\(.*\)<\/value>/\1/' | sed -e 's/ //g')
+
+URL="${PROTO}://${NEXUSREPO}/service/local/repositories/${REPO}/content/${GROUPID//.//}/${ARTIFACTID}/${VERSION}/${ARTIFACTID}-${VT}.jar"
+#wget --no-check-certificate "${URL}" -O "/opt/tca/${ARTIFACTID}-${VERSION%-SNAPSHOT}.jar"
+wget --no-check-certificate "${URL}" -O "${ARTIFACTID}-${VERSION%-SNAPSHOT}.jar"
+