mirror of https://github.com/docker/cli.git
Merge pull request #2048 from thaJeztah/19.03_backport_ci_improvements
[19.03 backport] CI and testing improvements
This commit is contained in:
commit
578ab52ece
|
@ -1,2 +1,6 @@
|
||||||
|
.dockerignore
|
||||||
.git
|
.git
|
||||||
build
|
.gitignore
|
||||||
|
appveyor.yml
|
||||||
|
build
|
||||||
|
circle.yml
|
||||||
|
|
|
@ -5,8 +5,9 @@ wrappedNode(label: 'linux && x86_64', cleanWorkspace: true) {
|
||||||
|
|
||||||
stage "Run end-to-end test suite"
|
stage "Run end-to-end test suite"
|
||||||
sh "docker version"
|
sh "docker version"
|
||||||
|
sh "docker info"
|
||||||
sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
|
sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
|
||||||
IMAGE_TAG=clie2e${BUILD_NUMBER} \
|
IMAGE_TAG=clie2e${BUILD_NUMBER} \
|
||||||
make -f docker.Makefile test-e2e"
|
DOCKER_BUILDKIT=1 make -f docker.Makefile test-e2e"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
60
circle.yml
60
circle.yml
|
@ -4,35 +4,39 @@ jobs:
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
working_directory: /work
|
working_directory: /work
|
||||||
docker: [{image: 'docker:18.03-git'}]
|
docker: [{image: 'docker:18.09-git'}]
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker:
|
- setup_remote_docker:
|
||||||
version: 18.03.1-ce
|
version: 18.09.3
|
||||||
reusable: true
|
reusable: true
|
||||||
exclusive: false
|
exclusive: false
|
||||||
- run:
|
- run:
|
||||||
command: docker version
|
command: docker version
|
||||||
- run:
|
- run:
|
||||||
name: "Lint"
|
name: "Lint"
|
||||||
command: |
|
command: |
|
||||||
docker build -f dockerfiles/Dockerfile.lint --tag cli-linter:$CIRCLE_BUILD_NUM .
|
docker build --progress=plain -f dockerfiles/Dockerfile.lint --tag cli-linter:$CIRCLE_BUILD_NUM .
|
||||||
docker run --rm cli-linter:$CIRCLE_BUILD_NUM
|
docker run --rm cli-linter:$CIRCLE_BUILD_NUM
|
||||||
|
|
||||||
cross:
|
cross:
|
||||||
working_directory: /work
|
working_directory: /work
|
||||||
docker: [{image: 'docker:18.03-git'}]
|
docker: [{image: 'docker:18.09-git'}]
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
parallelism: 3
|
parallelism: 3
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker:
|
- setup_remote_docker:
|
||||||
version: 18.03.1-ce
|
version: 18.09.3
|
||||||
reusable: true
|
reusable: true
|
||||||
exclusive: false
|
exclusive: false
|
||||||
- run:
|
- run:
|
||||||
name: "Cross"
|
name: "Cross"
|
||||||
command: |
|
command: |
|
||||||
docker build -f dockerfiles/Dockerfile.cross --tag cli-builder:$CIRCLE_BUILD_NUM .
|
docker build --progress=plain -f dockerfiles/Dockerfile.cross --tag cli-builder:$CIRCLE_BUILD_NUM .
|
||||||
name=cross-$CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX
|
name=cross-$CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX
|
||||||
docker run \
|
docker run \
|
||||||
-e CROSS_GROUP=$CIRCLE_NODE_INDEX \
|
-e CROSS_GROUP=$CIRCLE_NODE_INDEX \
|
||||||
|
@ -46,18 +50,20 @@ jobs:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
working_directory: /work
|
working_directory: /work
|
||||||
docker: [{image: 'docker:18.03-git'}]
|
docker: [{image: 'docker:18.09-git'}]
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker:
|
- setup_remote_docker:
|
||||||
version: 18.03.1-ce
|
version: 18.09.3
|
||||||
reusable: true
|
reusable: true
|
||||||
exclusive: false
|
exclusive: false
|
||||||
- run:
|
- run:
|
||||||
name: "Unit Test with Coverage"
|
name: "Unit Test with Coverage"
|
||||||
command: |
|
command: |
|
||||||
mkdir -p test-results/unit-tests
|
mkdir -p test-results/unit-tests
|
||||||
docker build -f dockerfiles/Dockerfile.dev --tag cli-builder:$CIRCLE_BUILD_NUM .
|
docker build --progress=plain -f dockerfiles/Dockerfile.dev --tag cli-builder:$CIRCLE_BUILD_NUM .
|
||||||
docker run \
|
docker run \
|
||||||
-e GOTESTSUM_JUNITFILE=/tmp/junit.xml \
|
-e GOTESTSUM_JUNITFILE=/tmp/junit.xml \
|
||||||
--name \
|
--name \
|
||||||
|
@ -82,34 +88,38 @@ jobs:
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
working_directory: /work
|
working_directory: /work
|
||||||
docker: [{image: 'docker:18.03-git'}]
|
docker: [{image: 'docker:18.09-git'}]
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker:
|
- setup_remote_docker:
|
||||||
version: 18.03.1-ce
|
version: 18.09.3
|
||||||
reusable: true
|
reusable: true
|
||||||
exclusive: false
|
exclusive: false
|
||||||
- run:
|
- run:
|
||||||
name: "Validate Vendor, Docs, and Code Generation"
|
name: "Validate Vendor, Docs, and Code Generation"
|
||||||
command: |
|
command: |
|
||||||
rm -f .dockerignore # include .git
|
rm -f .dockerignore # include .git
|
||||||
docker build -f dockerfiles/Dockerfile.dev --tag cli-builder-with-git:$CIRCLE_BUILD_NUM .
|
docker build --progress=plain -f dockerfiles/Dockerfile.dev --tag cli-builder-with-git:$CIRCLE_BUILD_NUM .
|
||||||
docker run --rm cli-builder-with-git:$CIRCLE_BUILD_NUM \
|
docker run --rm cli-builder-with-git:$CIRCLE_BUILD_NUM \
|
||||||
make ci-validate
|
make ci-validate
|
||||||
no_output_timeout: 15m
|
no_output_timeout: 15m
|
||||||
shellcheck:
|
shellcheck:
|
||||||
working_directory: /work
|
working_directory: /work
|
||||||
docker: [{image: 'docker:18.03-git'}]
|
docker: [{image: 'docker:18.09-git'}]
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker:
|
- setup_remote_docker:
|
||||||
version: 18.03.1-ce
|
version: 18.09.3
|
||||||
reusable: true
|
reusable: true
|
||||||
exclusive: false
|
exclusive: false
|
||||||
- run:
|
- run:
|
||||||
name: "Run shellcheck"
|
name: "Run shellcheck"
|
||||||
command: |
|
command: |
|
||||||
docker build -f dockerfiles/Dockerfile.shellcheck --tag cli-validator:$CIRCLE_BUILD_NUM .
|
docker build --progress=plain -f dockerfiles/Dockerfile.shellcheck --tag cli-validator:$CIRCLE_BUILD_NUM .
|
||||||
docker run --rm cli-validator:$CIRCLE_BUILD_NUM \
|
docker run --rm cli-validator:$CIRCLE_BUILD_NUM \
|
||||||
make shellcheck
|
make shellcheck
|
||||||
workflows:
|
workflows:
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
ARG GO_VERSION=1.12.8
|
ARG GO_VERSION=1.12.8
|
||||||
|
|
||||||
FROM docker/containerd-shim-process:a4d1531 AS containerd-shim-process
|
|
||||||
|
|
||||||
# Use Debian based image as docker-compose requires glibc.
|
# Use Debian based image as docker-compose requires glibc.
|
||||||
FROM golang:${GO_VERSION}
|
FROM golang:${GO_VERSION}
|
||||||
|
|
||||||
|
@ -9,10 +7,6 @@ RUN apt-get update && apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
openssl \
|
openssl \
|
||||||
btrfs-tools \
|
|
||||||
libapparmor-dev \
|
|
||||||
libseccomp-dev \
|
|
||||||
iptables \
|
|
||||||
openssh-client \
|
openssh-client \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue