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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GO := GOFLAGS="-mod=vendor" go
CMDS := $(addprefix bin/, $(shell ls ./cmd | grep -v opm))
OPM := $(addprefix bin/, opm)
SPECIFIC_UNIT_TEST := $(if $(TEST),-run $(TEST),)
extra_env := $(GOENV)
export PKG := github.com/operator-framework/operator-registry
export GIT_COMMIT := $(or $(SOURCE_GIT_COMMIT),$(shell git rev-parse --short HEAD))
export OPM_VERSION := $(or $(SOURCE_GIT_TAG),$(shell git describe --always --tags HEAD))
Expand Down Expand Up @@ -34,11 +35,11 @@ endif
all: clean test build

$(CMDS):
$(GO) build $(extra_flags) $(TAGS) -o $@ ./cmd/$(notdir $@)
$(extra_env) $(GO) build $(extra_flags) $(TAGS) -o $@ ./cmd/$(notdir $@)

$(OPM): opm_version_flags=-ldflags "-X '$(PKG)/cmd/opm/version.gitCommit=$(GIT_COMMIT)' -X '$(PKG)/cmd/opm/version.opmVersion=$(OPM_VERSION)' -X '$(PKG)/cmd/opm/version.buildDate=$(BUILD_DATE)'"
$(OPM):
$(GO) build $(opm_version_flags) $(extra_flags) $(TAGS) -o $@ ./cmd/$(notdir $@)
$(extra_env) $(GO) build $(opm_version_flags) $(extra_flags) $(TAGS) -o $@ ./cmd/$(notdir $@)

.PHONY: build
build: clean $(CMDS) $(OPM)
Expand Down
8 changes: 4 additions & 4 deletions docs/contributors/e2e_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ running even after the test suite has completed.
1. Start the e2e tests:

```bash
DOCKER_REGISTRY_HOST=localhost:5000 make build e2e SKIPTLS="true" CLUSTER=kind
DOCKER_REGISTRY_HOST=localhost:5000 GOENV='GOOS=linux' make build e2e SKIPTLS="true" CLUSTER=kind
```

1. Run a specific BDD test using the `TEST` argument to make. Note that this argument uses regular expressions.

```bash
DOCKER_REGISTRY_HOST=localhost:5000 make build e2e TEST='builds and manipulates bundle and index images' SKIPTLS="true" CLUSTER=kind
DOCKER_REGISTRY_HOST=localhost:5000 GOENV='GOOS=linux' make build e2e TEST='builds and manipulates bundle and index images' SKIPTLS="true" CLUSTER=kind
```

1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
Expand All @@ -46,13 +46,13 @@ make file and use `-dryRun` with `-focus` and see if the regex would trigger you
1. Start the e2e tests:

```bash
DOCKER_REGISTRY_HOST=localhost:443 make build e2e CLUSTER=kind
DOCKER_REGISTRY_HOST=localhost:443 GOENV='GOOS=linux' make build e2e CLUSTER=kind
```

1. Run a specific BDD test using the `TEST` argument to make. Note that this argument uses regular expressions.

```bash
DOCKER_REGISTRY_HOST=localhost:443 make build e2e TEST='builds and manipulates bundle and index images' CLUSTER=kind
DOCKER_REGISTRY_HOST=localhost:443 GOENV='GOOS=linux' make build e2e TEST='builds and manipulates bundle and index images' CLUSTER=kind
```

1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
Expand Down