move compose-cli code into docker/compose/v2

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof
2021-08-31 18:53:24 +02:00
parent c944c970ab
commit 1ae9b3cb5d
401 changed files with 199 additions and 41265 deletions

View File

@@ -49,29 +49,16 @@ Briefly describe the problem you are having in a few paragraphs.
**Additional information you deem important (e.g. issue happens only occasionally):**
**Output of `docker-compose --version`:**
**Output of `docker compose version`:**
```
(paste your output here)
```
**Output of `docker version`:**
```
(paste your output here)
```
**Output of `docker context show`:**
You can also run `docker context inspect context-name` to give us more details but don't forget to remove sensitive content.
```
(paste your output here)
```
**Output of `docker info`:**
```
(paste your output here)
```
**Additional environment details (AWS ECS, Azure ACI, local, etc.):**
**Additional environment details:**

View File

@@ -3,12 +3,4 @@
**Related issue**
<!-- If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" -->
<!-- optional tests
You can add a / mention to run tests executed by default only on main branch :
* `test-kube` to run Kube E2E tests
* `test-aci` to run ACI E2E tests
* `test-ecs` to run ECS E2E tests
* `test-windows` to run tests & E2E tests on windows
-->
**(not mandatory) A picture of a cute animal, if possible in relation with what you did**

27
.github/labeler.yml vendored
View File

@@ -1,27 +0,0 @@
aci:
- aci/**/*
ecs:
- ecs/**/*
local:
- local/**/*
kube:
- kube/**/*
cli:
- cli/**/*
metrics:
- cli/metrics/**/*
api:
- api/**/*
- cli/server/protos/**/*
ci:
- .github/**/*
documentation:
- docs/**/*

View File

@@ -1,58 +0,0 @@
name: ACI integration tests
on:
push:
branches:
- main
pull_request:
jobs:
check-optional-tests:
name: Check if needs to run ACI tests
runs-on: ubuntu-latest
outputs:
trigger-aci: ${{steps.runacitest.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if test ACI
if: github.event_name == 'pull_request'
id: runacitest
with:
trigger: '/test-aci'
aci-tests:
name: ACI e2e tests
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
needs: check-optional-tests
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-aci == 'true'
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Setup docker CLI
run: |
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
- name: Checkout code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Build for ACI e2e tests
run: make -f builder.Makefile cli
- name: ACI e2e Test
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
run: make e2e-aci

View File

@@ -3,7 +3,7 @@ name: Continuous integration
on:
push:
branches:
- main
- v2
pull_request:
jobs:
@@ -25,12 +25,9 @@ jobs:
- name: Validate go-mod is up-to-date and license headers
run: make validate
- name: Validate imports
run: make import-restrictions
- name: Run golangci-lint
env:
BUILD_TAGS: kube,e2e
BUILD_TAGS: e2e
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin/ v1.39.0
make -f builder.Makefile lint
@@ -60,7 +57,7 @@ jobs:
# Ensure we don't discover cross platform build issues at release time.
# Time used to build linux here is gained back in the build for local E2E step
- name: Build packages
run: make -f builder.Makefile cross cross-compose-plugin
run: make -f builder.Makefile cross
build:
name: Build
@@ -99,7 +96,7 @@ jobs:
- name: Build for local E2E
env:
BUILD_TAGS: e2e
run: make -f builder.Makefile cli compose-plugin
run: make -f builder.Makefile compose-plugin
- name: E2E Test
run: make e2e-compose

View File

@@ -1,50 +0,0 @@
name: Releaser
on:
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true
dry-run:
description: 'Dry run'
required: false
default: 'true'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Setup docker CLI
run: |
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
- name: Checkout code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: make -f builder.Makefile cross
- name: License
run: cp packaging/* bin/
- uses: ncipollo/release-action@v1
if: ${{ github.event.inputs.dry-run != 'true' }}
with:
artifacts: "bin/*"
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}

View File

@@ -1,62 +0,0 @@
name: ECS integration tests
on:
push:
branches:
- main
pull_request:
jobs:
check-optional-tests:
name: Check if needs to run ECS tests
runs-on: ubuntu-latest
outputs:
trigger-ecs: ${{steps.runecstest.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if test ECS
if: github.event_name == 'pull_request'
id: runecstest
with:
trigger: '/test-ecs'
ecs-tests:
name: ECS e2e tests
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
needs: check-optional-tests
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-ecs == 'true'
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Setup docker CLI
run: |
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
- name: Checkout code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Build for ECS e2e tests
run: make -f builder.Makefile cli
- name: create aws config folder
run: mkdir -p ~/.aws
- name: ECS e2e Test
env:
AWS_DEFAULT_REGION: us-west-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
run: make e2e-ecs

View File

@@ -1,63 +0,0 @@
name: Kube integration tests
on:
push:
branches:
- main
pull_request:
jobs:
check-optional-tests:
name: Check if needs to run Kube tests
runs-on: ubuntu-latest
outputs:
trigger-kube: ${{steps.runkubetest.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if test Kube
if: github.event_name == 'pull_request'
id: runkubetest
with:
trigger: '/test-kube'
kube-tests:
name: Kube e2e tests
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
needs: check-optional-tests
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-kube == 'true'
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Setup docker CLI
run: |
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
- name: Setup Kube tools
run: |
sudo apt-get install jq && jq --version
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.10.0/kind-linux-amd64 && chmod +x ./kind && sudo mv ./kind /usr/bin/ && kind version
curl -LO "https://dl.k8s.io/release/v1.20.2/bin/linux/amd64/kubectl" && sudo mv kubectl /usr/bin/ && kubectl version --client
- name: Checkout code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Build for Kube e2e tests
env:
BUILD_TAGS: kube
run: make -f builder.Makefile cli
- name: Kube e2e Test
run: make e2e-kube

View File

@@ -1,11 +0,0 @@
name: 'PR labeler'
on:
- pull_request_target
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2.1.1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'

View File

@@ -1,17 +0,0 @@
name: Remove pending label on answer
on:
issue_comment:
types: [ created ]
jobs:
pending:
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'pending') }}
name: Remove pending label
runs-on: ubuntu-latest
steps:
- name: removelabel
uses: siegerts/pending-response@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pending-response-label: pending

View File

@@ -1,72 +0,0 @@
name: Windows CI
on:
push:
branches:
- main
pull_request:
jobs:
check-optional-tests:
name: Check if needs to run Windows build and tests
runs-on: ubuntu-latest
outputs:
trigger-windows: ${{steps.runwindowstest.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if test Windows
if: github.event_name == 'pull_request'
id: runwindowstest
with:
trigger: '/test-windows'
windows-build:
name: Windows Build
runs-on: windows-latest
env:
GO111MODULE: "on"
needs: check-optional-tests
if: github.ref == 'refs/heads/main' || needs.check-optional-tests.outputs.trigger-windows == 'true'
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Setup docker CLI
run: |
docker version
curl -L -o docker.exe https://github.com/StefanScherer/docker-cli-builder/releases/download/20.10.5/docker.exe
mv -Force ./docker.exe "C:\Program Files\Docker\"
docker version
- name: Checkout code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Test
run: make -f builder.Makefile test
- name: Build
env:
BUILD_TAGS: e2e
run: make -f builder.Makefile cli
- name: E2E Test
run: make e2e-win-ci
- name: ACI e2e Test
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
# need to docker logout on windows nodes, it seems GHActions does a `docker login --user githubactions` specifically on windows nodes
run: |
docker logout
make e2e-aci