From 06cca53fa0d6116a34d00a560ef754010a416e32 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Sep 2019 08:51:06 +0200 Subject: [PATCH] Dockerfile: remove GOMETALINTER_OPTS This `ENV` was added to the Dockerfile in b96093fa56a9c085cb3123010be2430753c40cbc, when the repository used per-architecture Dockerfiles, and some architectures needed a different configuration. Now that we use a multi-arch Dockerfile, and CI uses a Jenkinsfile, we can remove this `ENV` from the Dockerfile, and set it in CI instead if needed. Also updated the wording and fixed linting issues in hack/validate/gometalinter Signed-off-by: Sebastiaan van Stijn (cherry picked from commit a464a3d51f89566b3e480d66903056004576cc85) Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 2 -- hack/validate/gometalinter | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0b729a22d..edd41b1c86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -281,8 +281,6 @@ COPY --from=djs55/vpnkit@sha256:e508a17cfacc8fd39261d5b4e397df2b953690da577e2c98 ENV PATH=/usr/local/cli:$PATH ENV DOCKER_BUILDTAGS apparmor seccomp selinux -# Options for hack/validate/gometalinter -ENV GOMETALINTER_OPTS="--deadline=2m" WORKDIR /go/src/github.com/docker/docker VOLUME /var/lib/docker # Wrap all commands in the "docker-in-docker" script to allow nested containers diff --git a/hack/validate/gometalinter b/hack/validate/gometalinter index 0c0ae0d7ee..4300b67a11 100755 --- a/hack/validate/gometalinter +++ b/hack/validate/gometalinter @@ -4,10 +4,11 @@ set -e -o pipefail SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # CI platforms differ, so per-platform GOMETALINTER_OPTS can be set -# from a platform-specific Dockerfile, otherwise let's just set +# in the Jenkinsfile, otherwise let's just set a # (somewhat pessimistic) default of 10 minutes. -: ${GOMETALINTER_OPTS=--deadline=10m} +: "${GOMETALINTER_OPTS=--deadline=10m}" +# shellcheck disable=SC2086 gometalinter \ ${GOMETALINTER_OPTS} \ - --config ${SCRIPTDIR}/gometalinter.json ./... + --config "${SCRIPTDIR}/gometalinter.json" ./...