Skip to content

Commit

Permalink
Remove vendor dir
Browse files Browse the repository at this point in the history
Removes the vendor directory from source control and attempts to cache the vendor dir when github actions are run. Also removes a couple of Dockerfiles which are no longer used and relied on the vendor directory.
Signed-off-by: dtfranz <dfranz@redhat.com>
  • Loading branch information
dtfranz committed Apr 18, 2023
1 parent 0aebc3c commit 69d4237
Show file tree
Hide file tree
Showing 6,458 changed files with 16 additions and 2,116,555 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- run: make build
4 changes: 1 addition & 3 deletions .github/workflows/codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ files=""
save_to=""
direct_file_upload=""
cacert="$CODECOV_CA_BUNDLE"
gcov_ignore="-not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**'"
gcov_ignore="-not -path './bower_components/**' -not -path './node_modules/**'"
gcov_include=""

ft_gcov="1"
Expand Down Expand Up @@ -1661,7 +1661,6 @@ then
# skip empty lines, comments, and brackets
cd "$git_root" && \
find . -type f \
-not -path '*/vendor/*' \
-not -path '*/caches/*' \
-name '*.go' \
-exec \
Expand Down Expand Up @@ -1697,7 +1696,6 @@ then
# skip empty lines, comments, and brackets
cd "$git_root" && \
find . -type f \
-not -path "*/vendor/*" \
-name '*.php' \
-exec \
grep -nIHE \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-apidiff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
id: go
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ jobs:
# GoReleaser requires fetch-depth: 0 to correctly
# run git describe
fetch-depth: 0
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"

- name: "Run GoReleaser"
run: make release
env:
Expand All @@ -78,10 +77,9 @@ jobs:
# run git describe
fetch-depth: 0

- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"

- name: "Run GoReleaser"
run: make release
env:
Expand All @@ -103,10 +101,9 @@ jobs:
# run git describe
fetch-depth: 0

- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"

- name: "Install linux cross-compilers"
run: |
sudo apt-get update
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Run sanity checks
run: make vendor && make lint && git diff --exit-code
run: make lint && git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Install podman
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- run: make unit
Expand Down
37 changes: 0 additions & 37 deletions Dockerfile

This file was deleted.

20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL = /bin/bash
GO := GOFLAGS="-mod=vendor" go
GO := go
CMDS := $(addprefix bin/, $(shell ls ./cmd | grep -v opm))
OPM := $(addprefix bin/, opm)
SPECIFIC_UNIT_TEST := $(if $(TEST),-run $(TEST),)
Expand Down Expand Up @@ -74,23 +74,14 @@ sanity-check:
docker run --rm -it -v "$(shell pwd)"/pkg/lib/indexer/testdata/:/database sanity-container \
./bin/opm registry serve --database /database/bundles.db --timeout-seconds 1

.PHONY: image
image:
docker build .

.PHONY: image-upstream
image-upstream:
docker build -f upstream-example.Dockerfile .

.PHONY: vendor
vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify

.PHONY: lint
lint:
find . -name '*.go' -not -path "./vendor/*" | xargs goimports -w
find . -name '*.go' | xargs goimports -w

.PHONY: codegen
codegen:
Expand All @@ -99,13 +90,6 @@ codegen:
protoc -I pkg/api/grpc_health_v1 --go_out=pkg/api/grpc_health_v1 pkg/api/grpc_health_v1/*.proto
protoc -I pkg/api/grpc_health_v1 --go-grpc_out=pkg/api/grpc_health_v1 pkg/api/grpc_health_v1/*.proto

.PHONY: container-codegen
container-codegen:
docker build -t operator-registry:codegen -f codegen.Dockerfile .
docker run --name temp-codegen operator-registry:codegen /bin/true
docker cp temp-codegen:/codegen/pkg/api/. ./pkg/api
docker rm temp-codegen

.PHONY: generate-fakes
generate-fakes:
$(GO) generate ./...
Expand Down
19 changes: 0 additions & 19 deletions codegen.Dockerfile

This file was deleted.

8 changes: 4 additions & 4 deletions docs/contributors/e2e_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ running even after the test suite has completed.
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).

```bash
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
```

## Kind with SSL
Expand All @@ -59,7 +59,7 @@ make file and use `--dry-run` with `--focus` and see if the regex would trigger
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).

```bash
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
```

## Minikube (or other type) using kubeconfig without SSL
Expand Down Expand Up @@ -94,7 +94,7 @@ make file and use `--dry-run` with `--focus` and see if the regex would trigger
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).

```bash
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
```

TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind" > /tmp/kindconfig` and set `KUBECONFIG="/tmp/kindconfig"`
Expand Down Expand Up @@ -131,7 +131,7 @@ TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind"
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).

```bash
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
```

TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind" > /tmp/kindconfig` and set `KUBECONFIG="/tmp/kindconfig"`
Expand Down
21 changes: 0 additions & 21 deletions vendor/github.com/Azure/go-ansiterm/LICENSE

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/github.com/Azure/go-ansiterm/README.md

This file was deleted.

Loading

0 comments on commit 69d4237

Please sign in to comment.