mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
Fix travis kyaml exit and targets
- properly exit non-0 if there are any uncommitted files - make functions/examples targes - add missing licenses - refactor into loop
This commit is contained in:
@@ -7,6 +7,8 @@ license:
|
|||||||
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense)
|
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense)
|
||||||
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
|
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
|
||||||
|
|
||||||
|
all: license
|
||||||
|
|
||||||
image:
|
image:
|
||||||
docker build image -t gcr.io/kustomize-functions/example-cockroachdb:v0.1.0
|
docker build image -t gcr.io/kustomize-functions/example-cockroachdb:v0.1.0
|
||||||
docker push gcr.io/kustomize-functions/example-cockroachdb:v0.1.0
|
docker push gcr.io/kustomize-functions/example-cockroachdb:v0.1.0
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2019 The Kubernetes Authors.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
FROM alpine:latest as schemas
|
FROM alpine:latest as schemas
|
||||||
RUN apk --no-cache add git
|
RUN apk --no-cache add git
|
||||||
RUN git clone --depth 1 https://github.com/instrumenta/kubernetes-json-schema.git
|
RUN git clone --depth 1 https://github.com/instrumenta/kubernetes-json-schema.git
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2019 The Kubernetes Authors.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# Exits with status 0 if it can be determined that the
|
# Exits with status 0 if it can be determined that the
|
||||||
# current PR should not trigger all travis checks.
|
# current PR should not trigger all travis checks.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Copyright 2019 The Kubernetes Authors.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd kyaml
|
# run all tests for kyaml and related commands
|
||||||
make all
|
targets="kyaml cmd/config cmd/kubectl functions/examples/injection-tshirt-sizes functions/examples/template-go-nginx functions/examples/template-heredoc-cockroachdb functions/examples/validator-kubeval functions/examples/validator-resource-requests"
|
||||||
|
for target in $targets; do
|
||||||
cd ../cmd/config
|
pushd .
|
||||||
make all
|
cd $target
|
||||||
|
make all
|
||||||
cd ../kubectl
|
popd
|
||||||
make all
|
done
|
||||||
|
|
||||||
# make sure no files were generated or changed by make
|
# make sure no files were generated or changed by make
|
||||||
cd ../..
|
# ignore changes to go.mod and go.sum -- they are too flaky
|
||||||
|
find . -name go.mod | xargs git checkout --
|
||||||
|
find . -name go.sum | xargs git checkout --
|
||||||
git add .
|
git add .
|
||||||
git diff-index HEAD --
|
git diff-index HEAD --exit-code
|
||||||
|
|||||||
Reference in New Issue
Block a user