Skip to content

Commit cc7275c

Browse files
authored
Merge pull request #6121 from thaJeztah/trust_plugin
implement `docker trust` as plugin
2 parents f7d6d5b + cee9ea6 commit cc7275c

File tree

203 files changed

+1360
-25245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+1360
-25245
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
-
7272
name: Test
7373
run: |
74-
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
74+
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/|/cmd/docker-trust')
7575
go tool cover -func=/tmp/coverage.txt
7676
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli
7777
shell: bash

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ENV GO111MODULE=auto
9797
RUN --mount=type=bind,target=.,rw \
9898
--mount=type=cache,target=/root/.cache \
9999
--mount=type=cache,target=/go/pkg/mod \
100-
gotestsum -- -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
100+
gotestsum -- -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/|/cmd/docker-trust')
101101

102102
FROM scratch AS test-coverage
103103
COPY --from=test /tmp/coverage.txt /coverage.txt

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ test: test-unit ## run tests
3434

3535
.PHONY: test-unit
3636
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
37-
gotestsum -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')} $(TESTFLAGS)
37+
gotestsum -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/|/cmd/docker-trust')} $(TESTFLAGS)
3838

3939
.PHONY: test-coverage
4040
test-coverage: ## run test coverage
4141
mkdir -p $(CURDIR)/build/coverage
42-
gotestsum -- $(shell go list ./... | grep -vE '/vendor/|/e2e/') -coverprofile=$(CURDIR)/build/coverage/coverage.txt
42+
gotestsum -- $(shell go list ./... | grep -vE '/vendor/|/e2e/|/cmd/docker-trust') -coverprofile=$(CURDIR)/build/coverage/coverage.txt
4343

4444
.PHONY: lint
4545
lint: ## run all the lint tools
@@ -69,6 +69,15 @@ dynbinary: ## build dynamically linked binary
6969
plugins: ## build example CLI plugins
7070
scripts/build/plugins
7171

72+
.PHONY: trust-plugin
73+
trust-plugin: ## build docker-trust CLI plugins
74+
scripts/build/trust-plugin
75+
76+
.PHONY: install-trust-plugin
77+
install-trust-plugin: trust-plugin
78+
install-trust-plugin: ## install docker-trust CLI plugins
79+
install -D -m 0755 "$$(readlink -f build/docker-trust)" /usr/libexec/docker/cli-plugins/docker-trust
80+
7281
.PHONY: vendor
7382
vendor: ## update vendor with go modules
7483
rm -rf vendor

cli/command/commands/commands.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
_ "github.com/docker/cli/cli/command/stack"
1919
_ "github.com/docker/cli/cli/command/swarm"
2020
_ "github.com/docker/cli/cli/command/system"
21-
_ "github.com/docker/cli/cli/command/trust"
2221
_ "github.com/docker/cli/cli/command/volume"
2322
"github.com/docker/cli/internal/commands"
2423
"github.com/spf13/cobra"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)