Commit Graph

44 Commits

Author SHA1 Message Date
Silvin Lubecki 277f61415e Better coverage output, removing unnecessary unit scripts.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2019-02-01 11:16:20 +01:00
Ian Campbell e96240427f Add basic framework for writing a CLI plugin
That is, the helper to be used from the plugin's `main`.

Also add a `helloworld` plugin example and build integration.

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-29 11:26:40 +00:00
Sebastiaan van Stijn cbb699ab9c
Makefile: make help: fix newline wrapping, and missing targets
This patch adds support for multiple newlines and removes the 1-space
indentation of wrapped lines.

Given these targets:

```Makefile
.PHONY: foobar
foobar: ## runs the foobar lorum ipsum.\nand so pn\nand so on
	echo foobar
```

Before this change, the output of `make help` was

```
foobar               runs the foobar lorum ipsum.
                      and so pn\nand so on
```

After this change, the output is:

```
foobar               runs the foobar lorum ipsum.
                     and so pn
                     and so on
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-10 13:30:03 +01:00
Sebastiaan van Stijn 5ab93bc8ef
Fix some missing targets in "make help"
The `make help` output was missing some targets (`fmt`, `test-unit`,
`test-e2e`).

Note that some targets are still hidden (`test-e2e-experimental`,
`test-e2e-non-experimental`, `test-e2e-connhelper-ssh`) as they're likely not
usually run separate from `test-e2e`.

Before this patch:

    make -f docker.Makefile help

    binary               build the CLI
    build                alias for binary
    clean                clean build artifacts
    cross                build the CLI for macOS and Windows
    binary-windows       build the CLI for Windows
    binary-osx           build the CLI for macOS
    dev                  start a build container in interactive mode for in-container development
    shell                alias for dev
    lint                 run linters
    vendor               download dependencies (vendor/) listed in vendor.conf
    dynbinary            build the CLI dynamically linked
    authors              generate AUTHORS file from git history
    manpages             generate man pages from go source and markdown
    yamldocs             generate documentation YAML files consumed by docs repo
    shellcheck           run shellcheck validation
    help                 print this help

With this patch applied:

    make -f docker.Makefile help

    binary               build the CLI
    build                alias for binary
    clean                clean build artifacts
    test-unit            run unit tests (using go test)
    cross                build the CLI for macOS and Windows
    binary-windows       build the CLI for Windows
    binary-osx           build the CLI for macOS
    dev                  start a build container in interactive mode for in-container development
    shell                alias for dev
    lint                 run linters
    fmt                  run gofmt
    vendor               download dependencies (vendor/) listed in vendor.conf
    dynbinary            build the CLI dynamically linked
    authors              generate AUTHORS file from git history
    manpages             generate man pages from go source and markdown
    yamldocs             generate documentation YAML files consumed by docs repo
    shellcheck           run shellcheck validation
    test-e2e             run all e2e tests
    help                 print this help

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-10 13:27:20 +01:00
Ian Campbell 7c8ee78eaf build: Add a `fmt` target which runs `gofmt` on all files.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-12-10 13:19:41 +00:00
Daniel Hiltgen b7ec4a42d9 Review comments
Address code review comemnts and purge additional dead code.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit f250152bf4)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-21 15:43:00 -07:00
Daniel Hiltgen fd2f1b3b66 Add engine commands built on containerd
This new collection of commands supports initializing a local
engine using containerd, updating that engine, and activating
the EE product

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-08-20 09:42:05 -07:00
Marco Vedovati 760ca04709 Add `help` and remove `watch` targets in docker.Makefile
* Add the `help` target to document make targets when building using a
container
* Remove the `watch` target (filewatcher was removed with c0588a9c) from
docker.Makefile and Makefile

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-07-31 14:38:51 +02:00
Daniel Nephin a6dedd1a12 Fix vendor validation
vendor/ must be removed first, otherwise files added to vendor/ but not vendor.conf
will not cause the validation to fail

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-02 11:01:05 -08:00
Sebastiaan van Stijn 02e7b18fde
Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-02 17:00:22 +01:00
Eli Uriegas 51080d6148 Add a way to just build windows and osx
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-09-19 16:48:31 -07:00
Eli Uriegas d53c8de06b Re-adds test target to the Makefile
The test target existed before, this is to provide a legacy interface to
allow easy testing for downstream Docker CE.

Without this we would need separate Makefiles/Jenkinsfiles for releases
past 17.07. Later on this target could also be used to test both unit
tests and integration tests at the same time.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-08-31 10:32:00 -07:00
Daniel Nephin 26418a12fb Add scripts for setting up e2e test environment.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-16 10:35:56 -04: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 12a7387c8e Add a warning when make is run outside of a container.
The warning can be disabled by setting the environment variable

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-26 15:58:15 -04:00
Jean-Pierre Huynh 649a5864f3 Update README and add help target to make
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-21 16:57:06 +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
Tibor Vass dc81def89c fix manpages script
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 05:00:10 +00:00
Tibor Vass ff615dbc4d Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-05 19:10:44 +00: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 73ebb07df5 Remove @ from Makefiles.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-17 15:56:19 -04:00
John Stephens b28c4822cc Merge pull request #90 from dnephin/add-windows-autogen
Add windows resources to binary
2017-05-17 11:59:54 -07:00
Daniel Nephin 8a6ad48d2b Add windows resources to binary.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 18:03:03 -04:00
Daniel Nephin 74c06a140b Support running unit tests when files are saved.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 17:02:58 -04:00
Daniel Nephin 60b2dd3e23 Update the README
Remove referenced to developing on the host, we shouldn't support it.

Move script/validate to scripts/validate to be consistent.
Set the default target to be binary instead of clean.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 14:07:30 -04:00
Daniel Nephin a787cbc93b Support building a dynbinary
Cleanup dynbinary and binary builds

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-12 13:34:06 -04:00
Daniel Nephin bcc46e75ab Merge pull request #56 from dnephin/add-compose-bindata-check
Add CI validation for compose bindata
2017-05-10 15:49:06 -04:00
Vincent Demeester ed5762cb9f Merge pull request #55 from mlaventure/generate-proper-version
Display proper version information
2017-05-10 09:34:22 +02:00
Gaetan de Villele c1f0bee31c update makefiles: add “vendor” target in docker.Makefile…
… so that contributors don’t need “vndr” on their laptop

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-05-09 14:29:14 -07:00
Kenfe-Mickael Laventure cf51bde7d9 Display proper version information
- The cli version defaults to "unknown-version" unless set via the VERSION env var
- The commit version can be overridden via GITCOMMIT env var
- The build time can be overridden via BUILDTIME env var

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-05-09 14:22:51 -07: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
Vincent Demeester 2daa598cce Merge pull request #41 from seemethere/fix_dev_null_device
Fix device for vendor target
2017-05-09 09:13:21 +02:00
Daniel Nephin 4aa65d9833 Run steps in parallel.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-08 15:57:56 -04:00
Tibor Vass 17311d3d1a Makefile: on clean, delete files in the build folder, but not the folder
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-05-08 11:24:40 -07:00
Eli Uriegas 2792fbce0f Fix device for vendor target
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-05-08 10:56:21 -07:00
Daniel Nephin 328fa4b717 Merge pull request #19 from dnephin/check-vendor
Check vendor
2017-05-03 16:01:56 -04:00
Gaetan de Villele 7f7e842702 define targets as “phony”, add comments, and mount docker.sock in dev target
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-05-03 11:14:06 -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 639764c00d Merge pull request #15 from gdevillele/pr-faster-build
improve speed of "go build" as well as "docker build"
2017-04-28 13:08:39 -07:00
Gaetan de Villele 4d4203f7fd add “test” target and make CI use it
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-27 15:57:35 -07:00
Gaetan de Villele 87449dbaa1 make go build and docker build operations faster
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-27 15:06:57 -07:00
Gaetan de Villele fb413981d3 add Makefiles and document their use in the README
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-25 09:57:06 -07:00