[SEBA-497]
Change to using alpine-grpc-base
Fix issue with nested exceptions causing an error in structlog
Reformat and python3 fixes, v3.5 mock support
Record execution times in the loader
Change-Id: I6d7923818d57012fca32ce44668820de422206d6
diff --git a/loader/Dockerfile.tosca-loader b/loader/Dockerfile.tosca-loader
index fd55517..cb58351 100644
--- a/loader/Dockerfile.tosca-loader
+++ b/loader/Dockerfile.tosca-loader
@@ -14,23 +14,21 @@
# xosproject/tosca-loader
-FROM alpine:3.7
+FROM alpine:3.9.2
-RUN apk add --no-cache httpie=0.9.9-r0
+RUN apk add --no-cache httpie
COPY tosca-loader.sh /usr/local/bin/tosca-loader.sh
# Label image
-ARG org_label_schema_schema_version=1.0
-ARG org_label_schema_name=tosca-loader
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
-LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
- org.label-schema.name=$org_label_schema_name \
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=tosca-loader \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
diff --git a/loader/tosca-loader.sh b/loader/tosca-loader.sh
index 9f27a8b..dfd8e82 100755
--- a/loader/tosca-loader.sh
+++ b/loader/tosca-loader.sh
@@ -21,11 +21,12 @@
for recipe in /opt/tosca/*
do
- echo "Loading: $recipe"
+ echo "Loading: $recipe, started at $(date -u '+%Y%m%d%H%M%SZ')"
http --check-status --ignore-stdin \
POST "http://xos-tosca:$XOS_TOSCA_SERVICE_PORT/run" \
"xos-username:$XOS_USER" \
"xos-password:$XOS_PASSWD" \
"@$recipe" || exit 1
echo ''
+ echo "Finished loading at $(date -u '+%Y%m%d%H%M%SZ')"
done