Initial commit.
Tools currently available are: go-junit-report, gocover-cobertura, golang, golang-ci-lint, hadolint, and protoc.
VERSION has been set to 1.0.0
Change-Id: Ib003e99ff36903da21db48e80153b1348e19d3c9
diff --git a/docker/go-junit-report.Dockerfile b/docker/go-junit-report.Dockerfile
new file mode 100644
index 0000000..36ff473
--- /dev/null
+++ b/docker/go-junit-report.Dockerfile
@@ -0,0 +1,47 @@
+# Copyright 2020-present Open Networking Foundation
+#
+# 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.
+
+FROM golang:1.13.5-alpine as build
+
+RUN apk add --no-cache build-base=0.5-r1
+
+# download & compile this specific version of go-junit-report
+ARG GO_JUNIT_REPORT_VERSION
+RUN GO111MODULE=on CGO_ENABLED=0 go get -u -ldflags "-linkmode external -extldflags -static" github.com/jstemmer/go-junit-report@v$GO_JUNIT_REPORT_VERSION
+
+FROM busybox:1.31.1
+
+# copy go-junit-report
+COPY --from=build /go/bin/* /usr/local/bin/
+
+WORKDIR /app
+
+# Label image
+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
+ARG GO_JUNIT_REPORT_VERSION=unknown
+
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=voltha-protoc \
+ 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 \
+ org.label-schema.build-date=$org_label_schema_build_date \
+ org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+ org.opencord.vcs-dirty=$org_opencord_vcs_dirty \
+ org.opencord.go-junit-report-version=$GO_JUNIT_REPORT_VERSION
diff --git a/docker/gocover-cobertura.Dockerfile b/docker/gocover-cobertura.Dockerfile
new file mode 100644
index 0000000..74e4600
--- /dev/null
+++ b/docker/gocover-cobertura.Dockerfile
@@ -0,0 +1,47 @@
+# Copyright 2020-present Open Networking Foundation
+#
+# 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.
+
+FROM golang:1.13.5-alpine as build
+
+RUN apk add --no-cache build-base=0.5-r1
+
+# download & compile this specific version of gocover-cobertura
+ARG GOCOVER_COBERTURA_VERSION
+RUN GO111MODULE=on CGO_ENABLED=0 go get -u -ldflags "-linkmode external -extldflags -static" github.com/t-yuki/gocover-cobertura@$GOCOVER_COBERTURA_VERSION
+
+FROM busybox:1.31.1
+
+# copy gocover-cobertura
+COPY --from=build /go/bin/* /usr/local/bin/
+
+WORKDIR /app
+
+# Label image
+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
+ARG GOCOVER_COBERTURA_VERSION=unknown
+
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=voltha-protoc \
+ 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 \
+ org.label-schema.build-date=$org_label_schema_build_date \
+ org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+ org.opencord.vcs-dirty=$org_opencord_vcs_dirty \
+ org.opencord.gocover-cobertura-version=$GOCOVER_COBERTURA_VERSION
diff --git a/docker/golang.Dockerfile b/docker/golang.Dockerfile
new file mode 100644
index 0000000..e22bd8c
--- /dev/null
+++ b/docker/golang.Dockerfile
@@ -0,0 +1,42 @@
+# Copyright 2020-present Open Networking Foundation
+#
+# 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.
+
+ARG GOLANG_VERSION
+FROM golang:$GOLANG_VERSION-alpine
+
+RUN apk add --no-cache git=2.24.1-r0 && \
+ mkdir -m 777 /.cache /go/pkg
+
+ENV GO111MODULE=on CGO_ENABLED=0
+
+WORKDIR /app
+
+# Label image
+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
+ARG GOLANG_VERSION=unknown
+
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=voltha-protoc \
+ 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 \
+ org.label-schema.build-date=$org_label_schema_build_date \
+ org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+ org.opencord.vcs-dirty=$org_opencord_vcs_dirty \
+ org.opencord.golang-version=$GOLANG_VERSION
\ No newline at end of file
diff --git a/docker/golangci-lint.Dockerfile b/docker/golangci-lint.Dockerfile
new file mode 100644
index 0000000..c494331
--- /dev/null
+++ b/docker/golangci-lint.Dockerfile
@@ -0,0 +1,40 @@
+# Copyright 2020-present Open Networking Foundation
+#
+# 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.
+
+ARG GOLANGCI_LINT_VERSION
+FROM golangci/golangci-lint:v$GOLANGCI_LINT_VERSION
+
+RUN mkdir -m 777 /.cache /go/pkg
+
+WORKDIR /app
+
+# Label image
+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
+ARG GOLANGCI_LINT_VERSION=unknown
+
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=voltha-golangci-lint \
+ 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 \
+ org.label-schema.build-date=$org_label_schema_build_date \
+ org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+ org.opencord.vcs-dirty=$org_opencord_vcs_dirty \
+ org.opencord.golangci-lint-version=$GOLANGCI_LINT_VERSION
+
diff --git a/docker/hadolint.Dockerfile b/docker/hadolint.Dockerfile
new file mode 100644
index 0000000..dec9bcd
--- /dev/null
+++ b/docker/hadolint.Dockerfile
@@ -0,0 +1,38 @@
+# Copyright 2020-present Open Networking Foundation
+#
+# 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.
+
+ARG HADOLINT_VERSION
+FROM hadolint/hadolint:v$HADOLINT_VERSION
+
+WORKDIR /app
+
+# Label image
+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
+ARG HADOLINT_VERSION=unknown
+
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=voltha-golangci-lint \
+ 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 \
+ org.label-schema.build-date=$org_label_schema_build_date \
+ org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+ org.opencord.vcs-dirty=$org_opencord_vcs_dirty \
+ org.opencord.hadolint-version=$HADOLINT_VERSION
+
diff --git a/docker/protoc.Dockerfile b/docker/protoc.Dockerfile
new file mode 100644
index 0000000..64fad1e
--- /dev/null
+++ b/docker/protoc.Dockerfile
@@ -0,0 +1,70 @@
+# Copyright 2020-present Open Networking Foundation
+#
+# 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.
+
+FROM golang:1.13.5-alpine as build
+
+ARG PROTOC_VERSION
+ARG PROTOC_GEN_GO_VERSION
+ARG PROTOC_SHA256SUM
+
+RUN apk add --no-cache libatomic=9.2.0-r3 musl=1.1.24-r0
+
+# download & compile this specific version of protoc-gen-go
+RUN GO111MODULE=on go get -u github.com/golang/protobuf/protoc-gen-go@v$PROTOC_GEN_GO_VERSION
+
+RUN mkdir -p /tmp/protoc3 && \
+ wget -O /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
+ [ "$(sha256sum /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip)" = "${PROTOC_SHA256SUM} /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip" ] && \
+ unzip /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /tmp/protoc3
+
+
+FROM busybox:1.31.1-glibc
+
+# dynamic libs for protoc
+COPY --from=build /usr/lib/libatomic.so.1 /usr/lib/
+COPY --from=build /lib/libc.musl-x86_64.so.1 /usr/lib/
+ENV LD_LIBRARY_PATH=/usr/lib
+
+# protoc & well-known-type definitions
+COPY --from=build /tmp/protoc3/bin/* /usr/local/bin/
+COPY --from=build /tmp/protoc3/include/ /usr/local/include/
+# fix permissions so non-root can use
+RUN chmod -R a+rx /usr/local/bin/protoc && \
+ chmod -R a+rX /usr/local/include/
+
+# copy protoc-gen-go
+COPY --from=build /go/bin/* /usr/local/bin/
+
+WORKDIR /app
+
+# Label image
+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
+ARG PROTOC_VERSION=unknown
+ARG PROTOC_GEN_GO_VERSION=unknown
+
+LABEL org.label-schema.schema-version=1.0 \
+ org.label-schema.name=voltha-protoc \
+ 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 \
+ org.label-schema.build-date=$org_label_schema_build_date \
+ org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
+ org.opencord.vcs-dirty=$org_opencord_vcs_dirty \
+ org.opencord.protoc-version=$PROTOC_VERSION \
+ org.opencord.protoc-gen-go-version=$PROTOC_GEN_GO_VERSION