Move ARGs to prevent invalidating docker caches
Having the ARG at the top of the dockerfiles
cause all the cached layers below to be invalidated
resulting in needlessly re-downloading or re-copying
files
Change-Id: Ie701b1556ee21ecdcf629e06c9b26d80af0fb344
diff --git a/docker/Dockerfile.afrouterTest b/docker/Dockerfile.afrouterTest
index 33c6d46..5500156 100644
--- a/docker/Dockerfile.afrouterTest
+++ b/docker/Dockerfile.afrouterTest
@@ -17,13 +17,6 @@
FROM golang:1.12-alpine3.9 AS build-env
-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
-ARG org_opencord_vcs_dirty=unknown
-
# Install required packages
RUN apk add --no-cache wget git make build-base protobuf protobuf-dev
@@ -54,6 +47,13 @@
RUN cp afrouter/arouter.json /build/tests/suites/
RUN cp vendor/github.com/opencord/voltha-protos/go/voltha.pb /build/tests/suites/
+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
+ARG org_opencord_vcs_dirty=unknown
+
# Build
RUN cd afrouter && go build --tags integration -o /build/afrouter \
-ldflags \