Guillaume Lours
97a50f8d51
Add CI step to check license headers
...
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-08-17 16:55:25 +02:00
Chris Crone
9d073707b9
deps: Bump Go to 1.15 and Go linter to 1.30
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-08-12 10:36:09 +02:00
Christopher Crone
5ea711b586
dockerfile: Fix copyright
...
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-08-04 13:30:30 +02:00
Christopher Crone
5c947a2082
dockerfile: Update linter
...
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-07-31 16:17:19 +02:00
Christopher Crone
bda30502b8
dependencies: Bump Golang
...
* Go to 1.14.6
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-07-17 09:37:53 +02:00
Christopher Crone
8ec9b3c77b
dependencies: Bump Golang and linter
...
* Go 1.14.5
* golangci-lint 1.28.3
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-07-16 13:22:12 +02:00
Chris Crone
b881f16085
Merge pull request #364 from chris-crone/set-version-docker
...
Set version when building with Docker
2020-07-08 11:51:00 +02:00
Christopher Crone
539464ed3d
build: Set version when building with Docker
...
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-07-07 15:48:09 +02:00
Christopher Crone
878783d271
tools: Update Go and linter
...
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-07-07 15:29:48 +02:00
Djordje Lukic
ad72c866cc
Add license headers
2020-06-18 16:48:03 +02:00
Djordje Lukic
39042aa8bd
Build example and local backend conditionaly
...
* `make` will build the cli with all backends exnabled
* `make cross` will cross build without the example and local backend
You can still cross compile with all backends by doing
```console
$ BUILD_TAGS=example,local make cross
```
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-06-15 18:02:30 +02:00
Djordje Lukic
c34d016fdb
Unify protos with client interfaces
...
* change function names in containers.proto
* add streams proto
2020-06-08 09:43:19 +02:00
Christopher Crone
247fa56ee1
More Dockerfile best practices
...
* Use mounts for RUN commands to avoid creating extra layers
* Use built-in platform support
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-02 11:58:24 +02:00
Djordje Lukic
129e675932
Put all protos inside the `protos` package
2020-05-25 15:04:28 +02:00
Djordje Lukic
5d073028be
Add buildkit cache when running unit tests
...
Since running `go test` downloads dependencies we want to have them in
the builder cache
2020-05-22 13:26:30 +02:00
Christopher Crone
3c5d37326d
Use docker build for lint
...
This approach allows better caching of results (so faster subsequent
lints). It also avoids bind mounts which are slow.
Benchmarks on my machine (2017 MacBook Pro 13"):
* bind mount lint: 2m 38s
* new lint (after docker builder prune): 1m 35s
* old lint (rerun no changes): 2m 38s
* new lint (rerun added println in random Go file): 9s
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-22 13:14:44 +02:00
Djordje Lukic
8495500aa2
Add a CliSuite for cli unit tests
...
Makes writing unit tests for commands quite easier
2020-05-22 10:13:56 +02:00
Djordje Lukic
fe36c49246
Use alpine as base image
...
Installing docker on buster is a pain, use alpine to install it
2020-05-20 18:39:10 +02:00
Djordje Lukic
d8a38afecc
Implement printing published ports
2020-05-16 10:41:35 +02:00
Djordje Lukic
52f7902d40
Port parsing on the comand line
2020-05-15 15:04:09 +02:00
Djordje Lukic
a506b7f4e9
Fix `make protos`
...
The base target for protos was missing goimports, which we run after
making protos so that the linter doesn't fail on generated code
2020-05-14 21:53:14 +02:00
Djordje Lukic
7b26e8e836
Faster build
...
* Run in parallel
* lint
* test/build/e2e test
* use cache for go
* do not use docker for building
* remove useless dependencies from the base image
Build time passes from 5 minutes to 1 minute 30 seconds
2020-05-14 21:16:31 +02:00
Djordje Lukic
6486f199e2
Add multierror
...
docker/api/multierror wraps go-multierror from hashicorp with
our default error formating
2020-05-13 18:37:41 +02:00
Djordje Lukic
4e9a4185af
Add `make lint` and run it on CI
2020-05-05 10:50:30 +02:00
Djordje Lukic
6feedaf939
Use go modules on build
2020-05-05 10:27:44 +02:00
Djordje Lukic
ba8c824436
Cleanup Makefiles
...
* add `make help` target
* remove unused variables
* add .exe to the binary name when on windows
* add ldflags to go build to strip the binary (smaller binary size)
* `make protos` must be executed manually when proto files change
2020-05-05 10:07:11 +02:00
Djordje Lukic
9fd5f7bef3
Rename xcli to cross
2020-05-04 11:35:11 +02:00
Djordje Lukic
600feb1e00
Split makefiles
...
* Makefile is for users to use
* builder.Makefile is used by the builder container
2020-05-04 11:35:11 +02:00
Ulysses Souza
33c45a0a62
Add "goimports"
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-04 11:30:21 +02:00
Ulysses Souza
4f3c2c1996
Fix protos and its generation
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-04 11:30:21 +02:00
Djordje Lukic
6ecb5550f7
Use a request for the context list rpc in cli.proto
2020-04-30 12:42:11 +02:00
Djordje Lukic
cdff00d571
Run tests inside a container
2020-04-27 10:17:10 +02:00
Ulysses Souza
88aef2e4e2
Dockerize build and proto gen
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-04-24 14:20:42 +02:00