Add support for override of parameters using a label

Using the label `org.mobyproject.config` will use that JSON
(or yaml, but it is very hard to get yaml into a label as newlines are
not respected) for parameters that are not explicitly set in the yaml file.

Had to change parameter definitions so override behaves as expected.

fix #16

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-05-17 13:59:14 +01:00
parent df7f50a755
commit c734b47e9c
5 changed files with 374 additions and 90 deletions

View File

@@ -9,6 +9,7 @@ PREFIX?=/usr/local
moby: $(DEPS) lint
go build --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o $@ github.com/moby/tool/cmd/moby
.PHONY: lint
lint:
@echo "+ $@: golint, gofmt, go vet"
# golint
@@ -17,6 +18,8 @@ lint:
@test -z "$$(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)"
# govet
@test -z "$$(go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /dev/stderr)"
# go test
@go test github.com/moby/tool/cmd/moby
test: moby
./moby build test/test.yml