mirror of https://github.com/docker/cli.git
Add check for compose bindata.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
079a5598f1
commit
ef1d58dd87
12
Makefile
12
Makefile
|
@ -29,8 +29,10 @@ cross: clean
|
||||||
|
|
||||||
vendor: vendor.conf
|
vendor: vendor.conf
|
||||||
@vndr 2> /dev/null
|
@vndr 2> /dev/null
|
||||||
@if [ "`git status --porcelain -- vendor 2>/dev/null`" ]; then \
|
@script/validate/check-git-diff vendor
|
||||||
echo; echo "vendoring is wrong. These files were changed:"; \
|
|
||||||
echo; git status --porcelain -- vendor 2>/dev/null; \
|
cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
|
||||||
echo; exit 1; \
|
go generate github.com/docker/cli/cli/compose/schema
|
||||||
fi;
|
|
||||||
|
compose-jsonschema: cli/compose/schema/bindata.go
|
||||||
|
@script/validate/check-git-diff cli/compose/schema/bindata.go
|
||||||
|
|
|
@ -31,11 +31,11 @@ jobs:
|
||||||
docker build -f dockerfiles/Dockerfile.ci --tag cli-builder .
|
docker build -f dockerfiles/Dockerfile.ci --tag cli-builder .
|
||||||
docker run cli-builder make test
|
docker run cli-builder make test
|
||||||
- run:
|
- run:
|
||||||
name: "Vendor"
|
name: "Validate Vendor and Code Generation"
|
||||||
command: |
|
command: |
|
||||||
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then exit; fi
|
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then exit; fi
|
||||||
docker build -f dockerfiles/Dockerfile.ci --tag cli-builder .
|
docker build -f dockerfiles/Dockerfile.ci --tag cli-builder .
|
||||||
docker run cli-builder make -B vendor
|
docker run cli-builder make -B vendor compose-jsonschema
|
||||||
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: /work/build
|
path: /work/build
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,6 +11,10 @@ RUN go get github.com/mitchellh/gox && \
|
||||||
cp /go/bin/gox /usr/bin && \
|
cp /go/bin/gox /usr/bin && \
|
||||||
rm -rf /go/src/* /go/pkg/* /go/bin/*
|
rm -rf /go/src/* /go/pkg/* /go/bin/*
|
||||||
|
|
||||||
|
RUN go get github.com/jteeuwen/go-bindata/go-bindata && \
|
||||||
|
cp /go/bin/go-bindata /usr/bin && \
|
||||||
|
rm -rf /go/src/* /go/pkg/* /go/bin/*
|
||||||
|
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
WORKDIR /go/src/github.com/docker/cli
|
WORKDIR /go/src/github.com/docker/cli
|
||||||
CMD sh
|
CMD sh
|
||||||
|
|
|
@ -19,6 +19,10 @@ RUN go get github.com/mitchellh/gox && \
|
||||||
cp /go/bin/gox /usr/bin && \
|
cp /go/bin/gox /usr/bin && \
|
||||||
rm -rf /go/src/* /go/pkg/* /go/bin/*
|
rm -rf /go/src/* /go/pkg/* /go/bin/*
|
||||||
|
|
||||||
|
RUN go get github.com/jteeuwen/go-bindata/go-bindata && \
|
||||||
|
cp /go/bin/go-bindata /usr/bin && \
|
||||||
|
rm -rf /go/src/* /go/pkg/* /go/bin/*
|
||||||
|
|
||||||
COPY . /go/src/github.com/docker/cli
|
COPY . /go/src/github.com/docker/cli
|
||||||
|
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
DIFF_PATH=$1
|
||||||
|
|
||||||
|
if [ "`git status --porcelain -- $DIFF_PATH 2>/dev/null`" ]; then
|
||||||
|
echo
|
||||||
|
echo "These files were changed:"
|
||||||
|
echo
|
||||||
|
git status --porcelain -- $DIFF_PATH 2>/dev/null
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "$DIFF_PATH is correct"
|
||||||
|
fi;
|
Loading…
Reference in New Issue