diff --git a/cmd/config/docs/commands/sub.md b/cmd/config/docs/commands/sub.md index 38540fe9f..eb5b7fbc8 100644 --- a/cmd/config/docs/commands/sub.md +++ b/cmd/config/docs/commands/sub.md @@ -80,12 +80,12 @@ To create a substitution for a field see: `kustomize help config set create` # dir/resources.yaml ... metadata: - name: test-app1 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"ownedBy":"dev","description":"test environment"} + name: test-app1 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"setBy":"dev","description":"test environment"} ... --- ... metadata: - name: test-app2 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"ownedBy":"dev","description":"test environment"} + name: test-app2 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"setBy":"dev","description":"test environment"} ... Revert substitution: diff --git a/cmd/config/docs/commands/subset.md b/cmd/config/docs/commands/subset.md index 1a3f5ca00..f5ee8b91d 100644 --- a/cmd/config/docs/commands/subset.md +++ b/cmd/config/docs/commands/subset.md @@ -144,7 +144,7 @@ FieldMeta Schema read by `sub`: "type": "string", "description": "A description of the field's current value. Optional." }, - "ownedBy": { + "setBy": { "type": "string", "description": "The current owner of the field. Optional." }, diff --git a/cmd/config/internal/generateddocs/commands/docs.go b/cmd/config/internal/generateddocs/commands/docs.go index 598a8c676..ef0013e83 100644 --- a/cmd/config/internal/generateddocs/commands/docs.go +++ b/cmd/config/internal/generateddocs/commands/docs.go @@ -262,12 +262,12 @@ var SubExamples = ` # dir/resources.yaml ... metadata: - name: test-app1 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"ownedBy":"dev","description":"test environment"} + name: test-app1 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"setBy":"dev","description":"test environment"} ... --- ... metadata: - name: test-app2 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"ownedBy":"dev","description":"test environment"} + name: test-app2 # {"substitutions":[{"name":"prefix","marker":"PREFIX-","value":"test-"}],"setBy":"dev","description":"test environment"} ... Revert substitution: @@ -421,7 +421,7 @@ FieldMeta Schema read by ` + "`" + `sub` + "`" + `: "type": "string", "description": "A description of the field's current value. Optional." }, - "ownedBy": { + "setBy": { "type": "string", "description": "The current owner of the field. Optional." }, diff --git a/functions/examples/template-heredoc-cockroachdb/Makefile b/functions/examples/template-heredoc-cockroachdb/Makefile index fabbaeb52..0badb79a7 100644 --- a/functions/examples/template-heredoc-cockroachdb/Makefile +++ b/functions/examples/template-heredoc-cockroachdb/Makefile @@ -7,6 +7,8 @@ license: (which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) $(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . +all: license + image: docker build image -t gcr.io/kustomize-functions/example-cockroachdb:v0.1.0 docker push gcr.io/kustomize-functions/example-cockroachdb:v0.1.0 diff --git a/functions/examples/validator-kubeval/image/Dockerfile b/functions/examples/validator-kubeval/image/Dockerfile index 7181aa545..e7d0fd1c2 100644 --- a/functions/examples/validator-kubeval/image/Dockerfile +++ b/functions/examples/validator-kubeval/image/Dockerfile @@ -1,3 +1,6 @@ +# Copyright 2019 The Kubernetes Authors. +# SPDX-License-Identifier: Apache-2.0 + FROM alpine:latest as schemas RUN apk --no-cache add git RUN git clone --depth 1 https://github.com/instrumenta/kubernetes-json-schema.git diff --git a/kyaml/fieldmeta/fieldmeta.go b/kyaml/fieldmeta/fieldmeta.go index 5458b6285..9447c80af 100644 --- a/kyaml/fieldmeta/fieldmeta.go +++ b/kyaml/fieldmeta/fieldmeta.go @@ -18,7 +18,7 @@ type FieldMeta struct { // Substitutions are substitutions that may be performed against this field Substitutions []Substitution `yaml:"substitutions,omitempty" json:"substitutions,omitempty"` // OwnedBy records the owner of this field - OwnedBy string `yaml:"ownedBy,omitempty" json:"ownedBy,omitempty"` + OwnedBy string `yaml:"setBy,omitempty" json:"setBy,omitempty"` // DefaultedBy records that this field was default, but may be changed by other owners DefaultedBy string `yaml:"defaultedBy,omitempty" json:"defaultedBy,omitempty"` // Description is a description of the current field value, e.g. why it was set diff --git a/travis/consider-early-travis-exit.sh b/travis/consider-early-travis-exit.sh index eea852bcf..b979c8eea 100644 --- a/travis/consider-early-travis-exit.sh +++ b/travis/consider-early-travis-exit.sh @@ -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 # current PR should not trigger all travis checks. # diff --git a/travis/kyaml-pre-commit.sh b/travis/kyaml-pre-commit.sh index 28211cf2f..43594a821 100755 --- a/travis/kyaml-pre-commit.sh +++ b/travis/kyaml-pre-commit.sh @@ -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