Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 9d341e7

Browse files
author
Ulysses Souza
authored
Merge pull request #2055 from ndeloof/main
use docker/compose/v2
2 parents 0c20a1b + bd5def8 commit 9d341e7

File tree

243 files changed

+164
-16223
lines changed

Some content is hidden

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

243 files changed

+164
-16223
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
- name: Validate go-mod is up-to-date and license headers
2626
run: make validate
2727

28-
- name: Validate imports
29-
run: make import-restrictions
30-
3128
- name: Run golangci-lint
3229
env:
3330
BUILD_TAGS: kube,e2e
@@ -60,7 +57,7 @@ jobs:
6057
# Ensure we don't discover cross platform build issues at release time.
6158
# Time used to build linux here is gained back in the build for local E2E step
6259
- name: Build packages
63-
run: make -f builder.Makefile cross cross-compose-plugin
60+
run: make -f builder.Makefile cross
6461

6562
build:
6663
name: Build
@@ -99,7 +96,7 @@ jobs:
9996
- name: Build for local E2E
10097
env:
10198
BUILD_TAGS: e2e
102-
run: make -f builder.Makefile cli compose-plugin
99+
run: make -f builder.Makefile cli
103100

104101
- name: E2E Test
105-
run: make e2e-compose
102+
run: make e2e-local

.github/workflows/plugin-release.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Dockerfile

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,6 @@ RUN --mount=target=. \
7777
GIT_TAG=${GIT_TAG} \
7878
make BINARY=/out/docker -f builder.Makefile cli
7979

80-
FROM base AS make-compose-plugin
81-
ENV CGO_ENABLED=0
82-
ARG TARGETOS
83-
ARG TARGETARCH
84-
ARG BUILD_TAGS
85-
ARG GIT_TAG
86-
RUN --mount=target=. \
87-
--mount=type=cache,target=/go/pkg/mod \
88-
--mount=type=cache,target=/root/.cache/go-build \
89-
GOOS=${TARGETOS} \
90-
GOARCH=${TARGETARCH} \
91-
BUILD_TAGS=${BUILD_TAGS} \
92-
GIT_TAG=${GIT_TAG} \
93-
make COMPOSE_BINARY=/out/docker-compose -f builder.Makefile compose-plugin
94-
9580
FROM base AS make-cross
9681
ARG BUILD_TAGS
9782
ARG GIT_TAG
@@ -100,17 +85,14 @@ RUN --mount=target=. \
10085
--mount=type=cache,target=/root/.cache/go-build \
10186
BUILD_TAGS=${BUILD_TAGS} \
10287
GIT_TAG=${GIT_TAG} \
103-
make BINARY=/out/docker COMPOSE_BINARY=/out/docker-compose -f builder.Makefile cross
88+
make BINARY=/out/docker -f builder.Makefile cross
10489

10590
FROM scratch AS protos
10691
COPY --from=make-protos /compose-cli/cli/server/protos .
10792

10893
FROM scratch AS cli
10994
COPY --from=make-cli /out/* .
11095

111-
FROM scratch AS compose-plugin
112-
COPY --from=make-compose-plugin /out/* .
113-
11496
FROM scratch AS cross
11597
COPY --from=make-cross /out/* .
11698

Makefile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ else
3131
TEST_FLAGS=-run $(E2E_TEST)
3232
endif
3333

34-
all: cli compose-plugin
34+
all: cli
3535

3636
protos: ## Generate go code from .proto files
3737
@docker build . --target protos \
@@ -44,16 +44,6 @@ cli: ## Compile the cli
4444
--build-arg GIT_TAG=$(GIT_TAG) \
4545
--output ./bin
4646

47-
compose-plugin: ## Compile the compose cli-plugin
48-
@docker build . --target compose-plugin \
49-
--platform local \
50-
--build-arg BUILD_TAGS=e2e,kube \
51-
--build-arg GIT_TAG=$(GIT_TAG) \
52-
--output ./bin
53-
54-
e2e-compose: ## Run End to end local tests. Set E2E_TEST=TestName to run a single test
55-
gotestsum $(TEST_FLAGS) ./pkg/e2e -- -count=1
56-
5747
e2e-local: ## Run End to end local tests. Set E2E_TEST=TestName to run a single test
5848
gotestsum $(TEST_FLAGS) ./local/e2e/container ./local/e2e/cli-only -- -count=1
5949

aci/aci.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import (
2929
"github.com/Azure/go-autorest/autorest/to"
3030
tm "github.com/buger/goterm"
3131
"github.com/compose-spec/compose-go/types"
32+
"github.com/docker/compose/v2/pkg/api"
33+
"github.com/docker/compose/v2/pkg/progress"
3234
"github.com/gobwas/ws"
3335
"github.com/gobwas/ws/wsutil"
3436
"github.com/morikuni/aec"
@@ -39,8 +41,6 @@ import (
3941
"github.com/docker/compose-cli/api/client"
4042
"github.com/docker/compose-cli/api/containers"
4143
"github.com/docker/compose-cli/api/context/store"
42-
"github.com/docker/compose-cli/pkg/api"
43-
"github.com/docker/compose-cli/pkg/progress"
4444
)
4545

4646
func createACIContainers(ctx context.Context, aciContext store.AciContext, groupDefinition containerinstance.ContainerGroup) error {

aci/backend.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,19 @@ import (
2121

2222
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2019-12-01/containerinstance"
2323
"github.com/Azure/go-autorest/autorest/to"
24+
"github.com/docker/compose/v2/pkg/api"
2425
"github.com/pkg/errors"
2526

2627
"github.com/docker/compose-cli/aci/convert"
2728
"github.com/docker/compose-cli/aci/login"
2829
"github.com/docker/compose-cli/api/backend"
30+
"github.com/docker/compose-cli/api/cloud"
2931
"github.com/docker/compose-cli/api/containers"
32+
apicontext "github.com/docker/compose-cli/api/context"
33+
"github.com/docker/compose-cli/api/context/store"
3034
"github.com/docker/compose-cli/api/resources"
3135
"github.com/docker/compose-cli/api/secrets"
3236
"github.com/docker/compose-cli/api/volumes"
33-
"github.com/docker/compose-cli/pkg/api"
34-
35-
"github.com/docker/compose-cli/api/cloud"
36-
apicontext "github.com/docker/compose-cli/api/context"
37-
"github.com/docker/compose-cli/api/context/store"
3837
)
3938

4039
const (

aci/compose.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ import (
2222
"net/http"
2323

2424
"github.com/compose-spec/compose-go/types"
25+
"github.com/docker/compose/v2/pkg/api"
26+
"github.com/docker/compose/v2/pkg/progress"
2527
"github.com/pkg/errors"
2628
"github.com/sirupsen/logrus"
2729

2830
"github.com/docker/compose-cli/aci/convert"
2931
"github.com/docker/compose-cli/aci/login"
3032
"github.com/docker/compose-cli/api/context/store"
31-
"github.com/docker/compose-cli/pkg/api"
32-
"github.com/docker/compose-cli/pkg/progress"
3333
"github.com/docker/compose-cli/utils/formatter"
3434
)
3535

aci/containers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ import (
2626
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2019-12-01/containerinstance"
2727
"github.com/Azure/go-autorest/autorest"
2828
"github.com/Azure/go-autorest/autorest/to"
29+
"github.com/docker/compose/v2/pkg/api"
2930
"github.com/pkg/errors"
3031
"github.com/sirupsen/logrus"
3132

3233
"github.com/docker/compose-cli/aci/convert"
3334
"github.com/docker/compose-cli/aci/login"
3435
"github.com/docker/compose-cli/api/containers"
3536
"github.com/docker/compose-cli/api/context/store"
36-
"github.com/docker/compose-cli/pkg/api"
3737
)
3838

3939
type aciContainerService struct {

aci/context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424
"github.com/AlecAivazis/survey/v2/terminal"
2525
"github.com/Azure/azure-sdk-for-go/profiles/preview/preview/subscription/mgmt/subscription"
2626
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources"
27+
"github.com/docker/compose/v2/pkg/api"
28+
"github.com/docker/compose/v2/pkg/prompt"
2729
"github.com/hashicorp/go-uuid"
2830
"github.com/pkg/errors"
2931

3032
"github.com/docker/compose-cli/api/context/store"
31-
"github.com/docker/compose-cli/pkg/api"
32-
"github.com/docker/compose-cli/pkg/prompt"
3333
)
3434

3535
// ContextParams options for creating ACI context

aci/convert/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import (
2828
"github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2019-12-01/containerinstance"
2929
"github.com/Azure/go-autorest/autorest/to"
3030
"github.com/compose-spec/compose-go/types"
31+
"github.com/docker/compose/v2/pkg/api"
3132
"github.com/pkg/errors"
3233

3334
"github.com/docker/compose-cli/aci/login"
3435
"github.com/docker/compose-cli/api/containers"
3536
"github.com/docker/compose-cli/api/context/store"
36-
"github.com/docker/compose-cli/pkg/api"
3737
"github.com/docker/compose-cli/utils/formatter"
3838
)
3939

0 commit comments

Comments
 (0)