File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737
3838 host :
3939 runs-on : ${{ matrix.os }}
40- env :
41- GOPATH : ${{ github.workspace }}
42- GOBIN : ${{ github.workspace }}/bin
43- GO111MODULE : auto
4440 strategy :
4541 fail-fast : false
4642 matrix :
5753 -
5854 name : Checkout
5955 uses : actions/checkout@v3
60- with :
61- path : ${{ env.GOPATH }}/src/github.com/docker/cli
6256 -
6357 name : Set up Go
6458 uses : actions/setup-go@v4
6963 run : |
7064 go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
7165 go tool cover -func=/tmp/coverage.txt
72- working-directory : ${{ env.GOPATH }}/src/github.com/docker/cli
7366 shell : bash
7467 -
7568 name : Send to Codecov
7669 uses : codecov/codecov-action@v3
7770 with :
7871 file : /tmp/coverage.txt
79- working-directory : ${{ env.GOPATH }}/src/github.com/docker/cli
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
1313FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build-base-alpine
1414COPY --from=xx / /
1515RUN apk add --no-cache bash clang lld llvm file git
16- WORKDIR /go/ src/github.com/docker/cli
16+ WORKDIR /src
1717
1818FROM build-base-alpine AS build-alpine
1919ARG TARGETPLATFORM
@@ -23,7 +23,7 @@ RUN xx-apk add --no-cache musl-dev gcc
2323FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-bullseye
2424COPY --from=xx / /
2525RUN apt-get update && apt-get install --no-install-recommends -y bash clang lld llvm file
26- WORKDIR /go/ src/github.com/docker/cli
26+ WORKDIR /src
2727
2828FROM build-base-bullseye AS build-bullseye
2929ARG TARGETPLATFORM
@@ -119,7 +119,7 @@ COPY --from=build-plugins /out ./build/
119119COPY --from=buildx /buildx /usr/libexec/docker/cli-plugins/docker-buildx
120120COPY . .
121121ENV DOCKER_BUILDKIT=1
122- ENV PATH=/go/ src/github.com/docker/cli /build:$PATH
122+ ENV PATH=/src/build:$PATH
123123CMD ./scripts/test/e2e/entry
124124
125125FROM build-base-${BASE_VARIANT} AS dev
Original file line number Diff line number Diff line change 55#
66
77# Overridable env vars
8- DOCKER_CLI_MOUNTS ?= -v "$(CURDIR ) ":/go/ src/github.com/docker/cli
8+ DOCKER_CLI_MOUNTS ?= -v "$(CURDIR ) ":/src
99DOCKER_CLI_CONTAINER_NAME ?=
1010DOCKER_CLI_GO_BUILD_CACHE ?= y
1111
Original file line number Diff line number Diff line change @@ -46,13 +46,13 @@ RUN echo -e "\nYou are now in a development container. Run '\e\033[1mmake help\e
4646 && echo -e "cat /etc/motd\nPS1=\"\e[0;32m\u@docker-cli-dev\\$ \e[0m\"" >> /root/.bashrc
4747CMD bash
4848ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
49- ENV PATH=$PATH:/go/ src/github.com/docker/cli /build
49+ ENV PATH=$PATH:/src/build
5050
5151COPY --from=buildx /buildx /usr/libexec/docker/cli-plugins/docker-buildx
5252COPY --from=gofumpt /go/bin/* /go/bin/
5353COPY --from=gotestsum /go/bin/* /go/bin/
5454COPY --from=goversioninfo /go/bin/* /go/bin/
5555
56- WORKDIR /go/ src/github.com/docker/cli
56+ WORKDIR /src
5757ENV GO111MODULE=auto
5858COPY . .
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
1010ENV GO111MODULE=off
1111ENV CGO_ENABLED=0
1212ENV GOGC=75
13- WORKDIR /go/src/github.com/docker/cli
14- COPY --from=golangci-lint /usr/bin/golangci-lint /usr/bin/golangci-lint
13+ WORKDIR /src
1514RUN --mount=type=bind,target=. \
1615 --mount=type=cache,target=/root/.cache \
16+ --mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
1717 golangci-lint run
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22
33FROM koalaman/shellcheck-alpine:v0.7.1 AS shellcheck
4- WORKDIR /go/ src/github.com/docker/cli
4+ WORKDIR /src
55RUN --mount=type=bind,target=. \
66 set -eo pipefail; \
77 find scripts/ contrib/completion/bash -type f | grep -v scripts/winresources | grep -v '.*.ps1' | xargs shellcheck
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ runtests() {
6666 TEST_DOCKER_CERT_PATH=" ${DOCKER_CERT_PATH-} " \
6767 TEST_REMOTE_DAEMON=" ${REMOTE_DAEMON-} " \
6868 TEST_SKIP_PLUGIN_TESTS=" ${SKIP_PLUGIN_TESTS-} " \
69- GOPATH=" $GOPATH " \
7069 PATH=" $PWD /build/:/usr/bin:/usr/local/bin:/usr/local/go/bin" \
7170 HOME=" $HOME " \
7271 DOCKER_CLI_E2E_PLUGINS_EXTRA_DIRS=" $PWD /build/plugins-linux-amd64" \
You can’t perform that action at this time.
0 commit comments