Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The helper script to install and run lint is placed here at the root of project.
To fix any `gofmt` issues, you can simply run `gofmt` with `-w` flag like this

```shell
find . -name "*.go" | grep -v vendor/ | xargs gofmt -l -s -w
find . -name "*.go" | xargs gofmt -l -s -w
```

### Integration tests
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ REGISTRY?=gcr.io/kaniko-project
REPOPATH ?= $(ORG)/$(PROJECT)
VERSION_PACKAGE = $(REPOPATH)/pkg/version

GO_FILES := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
GO_FILES := $(shell find . -type f -name '*.go')
GO_LDFLAGS := '-extldflags "-static"
GO_LDFLAGS += -X $(VERSION_PACKAGE).version=$(VERSION)
GO_LDFLAGS += -w -s # Drop debugging symbols.
Expand All @@ -41,10 +41,8 @@ WARMER_PACKAGE = $(REPOPATH)/cmd/warmer
KANIKO_PROJECT = $(REPOPATH)/kaniko
BUILD_ARG ?=

# Force using Go Modules and always read the dependencies from
# the `vendor` folder.
# Force using Go Modules.
export GO111MODULE = on
export GOFLAGS = -mod=vendor


out/executor: $(GO_FILES)
Expand Down
2 changes: 1 addition & 1 deletion cmd/executor/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func addKanikoOptionsFlags() {

// addHiddenFlags marks certain flags as hidden from the executor help text
func addHiddenFlags(cmd *cobra.Command) {
// This flag is added in a vendored directory, hide so that it doesn't come up via --help
// This flag is added in a library, hide so that it doesn't come up via --help
pflag.CommandLine.MarkHidden("azure-container-registry-config")
// Hide this flag as we want to encourage people to use the --context flag instead
cmd.PersistentFlags().MarkHidden("bucket")
Expand Down
4 changes: 2 additions & 2 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ COPY . .
# To update the version of any tool installed here, run
#
# go get <tool>@<commit-sha-or-tag>
# go mod vendor
# go mod tidy
#
# Then submit a PR with the changes to `go.mod`, `go.sum`, and `vendor`.
# Then submit a PR with the changes to `go.mod` and `go.sum`.

# Get GCR credential helper
RUN go install github.com/GoogleCloudPlatform/docker-credential-gcr/v2
Expand Down
2 changes: 1 addition & 1 deletion hack/boilerplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
set -e

# Ignore these paths in the following tests.
ignore="vendor\|out"
ignore="out"
BOILERPLATEDIR=./hack/boilerplate
files=$(python3 ${BOILERPLATEDIR}/boilerplate.py --rootdir . --boilerplate-dir ${BOILERPLATEDIR})

Expand Down
2 changes: 1 addition & 1 deletion hack/boilerplate/boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import sys


SKIPPED_DIRS = ["Godeps", "third_party", ".git", "vendor", "examples", "testdata"]
SKIPPED_DIRS = ["Godeps", "third_party", ".git", "examples", "testdata"]
SKIPPED_FILES = ["install_golint.sh"]

parser = argparse.ArgumentParser()
Expand Down
4 changes: 2 additions & 2 deletions hack/gofmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# limitations under the License.


files=$(find . -name "*.go" | grep -v vendor/ | xargs gofmt -l -s)
files=$(find . -name "*.go" | xargs gofmt -l -s)
if [[ $files ]]; then
echo "Gofmt errors in files:"
echo "$files"
diff=$(find . -name "*.go" | grep -v vendor/ | xargs gofmt -d -s)
diff=$(find . -name "*.go" | xargs gofmt -d -s)
echo "$diff"
exit 1
fi
3 changes: 0 additions & 3 deletions integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ go_test(
"//pkg/timing",
"//pkg/util",
"//testutil",
"//vendor/github.com/google/go-containerregistry/pkg/name",
"//vendor/github.com/google/go-containerregistry/pkg/v1/daemon",
"//vendor/github.com/pkg/errors",
],
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/misc-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# TestRun and TestLayers
set -e

TESTS=$(./scripts/integration-test.sh -list=Test -mod=vendor)
TESTS=$(./scripts/integration-test.sh -list=Test)

TESTS=$(echo $TESTS | tr ' ' '\n' | grep 'Test'| grep -v 'TestRun' | grep -v 'TestLayers' | grep -v 'TestK8s' | grep -v 'TestSnapshotBenchmark')

Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GREEN='\033[0;32m'
RESET='\033[0m'

echo "Running go tests..."
go test -cover -coverprofile=out/coverage.out -v -timeout 120s `go list ./... | grep -v vendor | grep -v integration` | sed ''/PASS/s//$(printf "${GREEN}PASS${RESET}")/'' | sed ''/FAIL/s//$(printf "${RED}FAIL${RESET}")/''
go test -cover -coverprofile=out/coverage.out -v -timeout 120s `go list ./... | grep -v integration` | sed ''/PASS/s//$(printf "${GREEN}PASS${RESET}")/'' | sed ''/FAIL/s//$(printf "${RED}FAIL${RESET}")/''
GO_TEST_EXIT_CODE=${PIPESTATUS[0]}
if [[ $GO_TEST_EXIT_CODE -ne 0 ]]; then
exit $GO_TEST_EXIT_CODE
Expand Down
202 changes: 0 additions & 202 deletions vendor/cloud.google.com/go/LICENSE

This file was deleted.

Loading