From 526010074dcfbee344b4c067798976caa54de1e4 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 13 Jul 2018 09:05:29 +0200 Subject: [PATCH 1/5] Add bash completion for `service create|update --init` Signed-off-by: Harald Albers Upstream-commit: 97d312e02a5b55989a5c0e00e2d8460a25f77677 Component: cli --- components/cli/contrib/completion/bash/docker | 1 + 1 file changed, 1 insertion(+) diff --git a/components/cli/contrib/completion/bash/docker b/components/cli/contrib/completion/bash/docker index cca02b5798..9307caca8e 100644 --- a/components/cli/contrib/completion/bash/docker +++ b/components/cli/contrib/completion/bash/docker @@ -3402,6 +3402,7 @@ _docker_service_update_and_create() { local boolean_options=" --detach -d --help + --init --no-healthcheck --read-only --tty -t From 71a73ab18c573b77e7b417129c6f08bc1bb4e9c1 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 12 Jul 2018 14:09:22 +0200 Subject: [PATCH 2/5] Update gometalinter to v2.0.6 and remove alexkohler/nakedret alexkohler/nakedret is now installed by default with gometalinter, so it's no longer needed to install this manually Signed-off-by: Sebastiaan van Stijn Upstream-commit: f3811e865e98b0c5d23ae3c70589a9f521561f25 Component: cli --- components/cli/dockerfiles/Dockerfile.lint | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/components/cli/dockerfiles/Dockerfile.lint b/components/cli/dockerfiles/Dockerfile.lint index 9726eecb42..a55e37faf4 100644 --- a/components/cli/dockerfiles/Dockerfile.lint +++ b/components/cli/dockerfiles/Dockerfile.lint @@ -2,7 +2,7 @@ FROM golang:1.10.3-alpine RUN apk add -U git -ARG GOMETALINTER_SHA=7f9672e7ea538b8682e83395d50b12f09bb17b91 +ARG GOMETALINTER_SHA=v2.0.6 RUN go get -d github.com/alecthomas/gometalinter && \ cd /go/src/github.com/alecthomas/gometalinter && \ git checkout -q "$GOMETALINTER_SHA" && \ @@ -10,13 +10,6 @@ RUN go get -d github.com/alecthomas/gometalinter && \ gometalinter --install && \ rm -rf /go/src/* /go/pkg/* -ARG NAKEDRET_SHA=3ddb495a6d63bc9041ba843e7d651cf92639d8cb -RUN go get -d github.com/alexkohler/nakedret && \ - cd /go/src/github.com/alexkohler/nakedret && \ - git checkout -q "$NAKEDRET_SHA" && \ - go build -v -o /usr/local/bin/nakedret . && \ - rm -rf /go/src/* /go/pkg/* - WORKDIR /go/src/github.com/docker/cli ENV CGO_ENABLED=0 ENV DISABLE_WARN_OUTSIDE_CONTAINER=1 From ca353ee7ae17a76d902a375e65017db9edff2ba4 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 12 Jul 2018 14:25:19 +0200 Subject: [PATCH 3/5] Update hints for linting - remove some hints that are no longer needed - added a nolint: unparam for removeSingleSigner() (return bool is only used in tests) Signed-off-by: Sebastiaan van Stijn Upstream-commit: 9847e96765d70ca5c3f3bf072077ff4eeac53b61 Component: cli --- components/cli/cli/command/container/opts_test.go | 1 - components/cli/cli/command/registry/login_test.go | 1 - components/cli/cli/command/trust/signer_remove.go | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/cli/cli/command/container/opts_test.go b/components/cli/cli/command/container/opts_test.go index 67f0cad44d..6d7c95a5dd 100644 --- a/components/cli/cli/command/container/opts_test.go +++ b/components/cli/cli/command/container/opts_test.go @@ -42,7 +42,6 @@ func TestValidateAttach(t *testing.T) { } } -// nolint: unparam func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) { flags, copts := setupRunFlags() if err := flags.Parse(args); err != nil { diff --git a/components/cli/cli/command/registry/login_test.go b/components/cli/cli/command/registry/login_test.go index 7e77494186..d050ff59ab 100644 --- a/components/cli/cli/command/registry/login_test.go +++ b/components/cli/cli/command/registry/login_test.go @@ -28,7 +28,6 @@ type fakeClient struct { client.Client } -// nolint: unparam func (c fakeClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registrytypes.AuthenticateOKBody, error) { if auth.Password == expiredPassword { return registrytypes.AuthenticateOKBody{}, fmt.Errorf("Invalid Username or Password") diff --git a/components/cli/cli/command/trust/signer_remove.go b/components/cli/cli/command/trust/signer_remove.go index d4e8eec42b..6945f54e03 100644 --- a/components/cli/cli/command/trust/signer_remove.go +++ b/components/cli/cli/command/trust/signer_remove.go @@ -78,6 +78,7 @@ func isLastSignerForReleases(roleWithSig data.Role, allRoles []client.RoleWithSi // removeSingleSigner attempts to remove a single signer and returns whether signer removal happened. // The signer not being removed doesn't necessarily raise an error e.g. user choosing "No" when prompted for confirmation. +// nolint: unparam func removeSingleSigner(cli command.Cli, repoName, signerName string, forceYes bool) (bool, error) { ctx := context.Background() imgRefAndAuth, err := trust.GetImageReferencesAndAuth(ctx, nil, image.AuthResolver(cli), repoName) From 92fa05c73383680845863c6843fa4e9c690334d4 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 13 Jul 2018 11:26:07 +0200 Subject: [PATCH 4/5] Update CircleCI Docker version to 18.03 17.06 has reached EOL a long time ago; let's use a current version in CI as well :D Signed-off-by: Sebastiaan van Stijn Upstream-commit: e2a56c47daa924a368c0c8b81e6ec80d5d99ecdb Component: cli --- components/cli/circle.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/cli/circle.yml b/components/cli/circle.yml index 53fcac7389..624e5312f5 100644 --- a/components/cli/circle.yml +++ b/components/cli/circle.yml @@ -4,7 +4,7 @@ jobs: lint: working_directory: /work - docker: [{image: 'docker:17.06-git'}] + docker: [{image: 'docker:18.03-git'}] steps: - checkout - setup_remote_docker: @@ -22,7 +22,7 @@ jobs: cross: working_directory: /work - docker: [{image: 'docker:17.06-git'}] + docker: [{image: 'docker:18.03-git'}] parallelism: 3 steps: - checkout @@ -48,7 +48,7 @@ jobs: test: working_directory: /work - docker: [{image: 'docker:17.06-git'}] + docker: [{image: 'docker:18.03-git'}] steps: - checkout - setup_remote_docker: @@ -76,7 +76,7 @@ jobs: validate: working_directory: /work - docker: [{image: 'docker:17.06-git'}] + docker: [{image: 'docker:18.03-git'}] steps: - checkout - setup_remote_docker: @@ -93,7 +93,7 @@ jobs: make ci-validate shellcheck: working_directory: /work - docker: [{image: 'docker:17.06-git'}] + docker: [{image: 'docker:18.03-git'}] steps: - checkout - setup_remote_docker From 39803279211f2c2ffabe2920848543b117dac620 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 13 Jul 2018 11:46:31 +0200 Subject: [PATCH 5/5] Configure CircleCI remote daemon to use version 18.03.1 Signed-off-by: Sebastiaan van Stijn Upstream-commit: 13eb2aa1259a7d65b565b786b2c8b576123e021e Component: cli --- components/cli/circle.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/cli/circle.yml b/components/cli/circle.yml index 624e5312f5..073d4cf69e 100644 --- a/components/cli/circle.yml +++ b/components/cli/circle.yml @@ -8,6 +8,7 @@ jobs: steps: - checkout - setup_remote_docker: + version: 18.03.1-ce reusable: true exclusive: false - run: @@ -27,6 +28,7 @@ jobs: steps: - checkout - setup_remote_docker: + version: 18.03.1-ce reusable: true exclusive: false - run: @@ -52,6 +54,7 @@ jobs: steps: - checkout - setup_remote_docker: + version: 18.03.1-ce reusable: true exclusive: false - run: @@ -80,6 +83,7 @@ jobs: steps: - checkout - setup_remote_docker: + version: 18.03.1-ce reusable: true exclusive: false - run: @@ -96,7 +100,10 @@ jobs: docker: [{image: 'docker:18.03-git'}] steps: - checkout - - setup_remote_docker + - setup_remote_docker: + version: 18.03.1-ce + reusable: true + exclusive: false - run: name: "Run shellcheck" command: |