Commit Graph

34 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 937e65cac5
CircleCI: add some info steps, and re-group jobs
This patch:

- Combines the shellcheck and lint stages. Free CircleCI plans allow a maximum
  of 4 concurrent jobs, and from the timing, the "lint" and "shellcheck" stages
  combined would still take less time than the other stages, so combining them
  keeps the same overall duration, but saving one machine "slot".
- Splits some steps, so that their output can be found more easily in the CI
  results. For example, separating building of Docker images from running them.
- Adds a "Docker info" step, because information about the environment can be
  useful when debugging.
- Adds the "Docker info" and "Docker version" steps to all stages, so that it's
  possible to get that information without having to find the stage in which
  it's printed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-25 12:48:55 +02:00
Sebastiaan van Stijn ae58e356ea
Circle-CI: use progress=plain
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-12 11:29:02 +02:00
Sebastiaan van Stijn 9a6519db76
Circle-CI: enable buildkit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-12 11:29:00 +02:00
Sebastiaan van Stijn 8b19c1d73a
Update CircleCI Docker version to 18.09.3
18.03 has reached EOL; let's use a more current version in CI

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-10 17:09:59 +02:00
Sebastiaan van Stijn 53fc63a93f
Circle-CI: fix indentation in circle.yml
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-10 17:09:32 +02:00
Sebastiaan van Stijn dcc414be3e
CircleCI: store junit.xml as artifact
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-07 14:02:16 -07:00
Sebastiaan van Stijn dba90e4999
CircleCI: Increase no-output timeout to 15 minutes for vendoring
Vendoring can take some time, depending on network-speed, so
reduce flakiness by increasing the default timeout, to prevent:

    make[1]: Entering directory '/go/src/github.com/docker/cli'
    rm -rf vendor
    bash -c 'vndr |& grep -v -i clone'
    2019/03/18 11:38:26 Collecting initial packages
    Too long with no output (exceeded 10m0s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-18 13:07:22 +01:00
Silvin Lubecki 26c598801b Fix storing test results on circle ci.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2019-02-01 11:56:27 +01:00
Silvin Lubecki ff5a83c3aa Store the junit.xml file produced while running the unit tests.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2019-02-01 11:32:23 +01:00
Sebastiaan van Stijn 166856ab1b
Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-29 10:44:14 +01:00
Sebastiaan van Stijn 13eb2aa125
Configure CircleCI remote daemon to use version 18.03.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-13 11:51:41 +02:00
Sebastiaan van Stijn e2a56c47da
Update CircleCI Docker version to 18.03
17.06 has reached EOL a long time ago; let's use a current
version in CI as well :D

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-13 11:26:07 +02:00
Daniel Nephin 058733969c Set DISABLE_WARN_OUTSIDE_CONTAINER in the Dockerfile so that we don't spend 10s sleeping in CI
also add time to validate check

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-15 14:34:43 -04:00
Daniel Nephin 4e09dba068 Ignore codecov upload failures in CI.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-15 14:34:43 -04:00
Daniel Nephin 0f91d9e6c4 Cleanup dockerfiles and circle
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-18 12:22:28 -04:00
Jean-Pierre Huynh 501cf0e6d1 Update dockerfile path for CicleCI build
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-13 22:24:08 +01:00
Jean-Pierre Huynh b2fc35aefa Add shellcheck for bash completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-13 22:24:08 +01:00
Daniel Nephin 1eb66d60bd Add parallelism to cross build
Reusable docker engine

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-05 15:23:32 -04:00
Daniel Nephin 74c1388f66 Use an image with git and ssh for circleCI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-22 19:51:36 -04:00
Daniel Nephin 75aebdd463 Try out circleci workflow
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-15 12:38:40 -07:00
Daniel Nephin 343d836a95 Run docs and man generation in CI
Also cleanup the scripts a bit to be more consistent, and fail on errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-14 14:59:48 -07:00
Tibor Vass 8545341709 Merge pull request #157 from dnephin/make-compose-check-fail
Fix check-git-diff in CI
2017-06-12 17:15:35 -07:00
Daniel Nephin cda8281da8 Add a docker version print to CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-09 15:54:09 -04:00
Daniel Nephin f75a44ffd8 Fix check-git-diff so that it fails on CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-06 15:06:34 -04:00
Daniel Nephin f6d148c632 Upload coverage report from outside of test container.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-19 17:37:38 -04:00
Vincent Demeester d79d903864 Add test-coverage & codecov target and update circleci
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-05-19 17:22:37 -04:00
Daniel Nephin a408fb0a61 osx cross
Fix CI build

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-13 13:47:00 -04:00
Daniel Nephin ef1d58dd87 Add check for compose bindata.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-09 15:42:22 -04:00
Daniel Nephin aa07c40069 Fix vendor.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-08 16:15:54 -04:00
Daniel Nephin 4aa65d9833 Run steps in parallel.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-08 15:57:56 -04:00
Gaetan de Villele f35682a2f0 update circle.yml
- update from docker:17.04 to docker:17.05
- install git and ssh to suppress CircleCI warning

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-05-08 10:25:30 -07:00
Daniel Nephin 31851fbe3c Verify that vendored files are correct
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-02 17:57:32 -04:00
Daniel Nephin e3f677794a Add gometalinter to CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-02 17:15:56 -04:00
Gaetan de Villele 6b2a61a311 add circle ci config file
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-27 14:24:28 -07:00