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:
Phillip Wittrock
2019-12-17 09:28:44 -08:00
parent 49127f702c
commit ae2bfc8ee6
4 changed files with 23 additions and 10 deletions

View File

@@ -1,16 +1,21 @@
#!/bin/bash
# Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
set -e
cd kyaml
make all
cd ../cmd/config
make all
cd ../kubectl
make all
# run all tests for kyaml and related commands
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
pushd .
cd $target
make all
popd
done
# 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 diff-index HEAD --
git diff-index HEAD --exit-code