Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump the containers group with 2 updates #2539

Closed
Closed
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
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ run:
- e2e
- unit
- integration
- exclude_graphdriver_btrfs
- btrfs_noversion
- exclude_graphdriver_devicemapper
- containers_image_openpgp
skip-dirs:
- internal/mocks
modules-download-mode: readonly
Expand Down
25 changes: 13 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ MCLI_LINKER_FLAGS=${LINKER_FLAGS} -X github.com/mongodb/mongodb-atlas-cli/intern
ATLAS_LINKER_FLAGS=${LINKER_FLAGS} -X github.com/mongodb/mongodb-atlas-cli/internal/config.ToolName=atlascli -X github.com/mongodb/mongodb-atlas-cli/internal/version.Version=${ATLAS_VERSION}
ATLAS_E2E_BINARY?=../../../bin/${ATLAS_BINARY_NAME}

BUILD_TAGS?=exclude_graphdriver_btrfs || btrfs_noversion || exclude_graphdriver_devicemapper || containers_image_openpgp
DEBUG_FLAGS=all=-N -l

TEST_CMD?=go test
Expand Down Expand Up @@ -103,7 +104,7 @@ generate: gen-docs gen-mocks gen-code ## Generate docs, mocks, code, all auto ge
.PHONY: gen-code
gen-code: ## Generate code
@echo "==> Generating code"
go run ./tools/cli-generator
go run -tags "$(BUILD_TAGS)" ./tools/cli-generator

.PHONY: gen-mocks
gen-mocks: ## Generate mocks
Expand All @@ -116,12 +117,12 @@ gen-docs: gen-docs-mongocli gen-docs-atlascli ## Generate docs for commands
.PHONY: gen-docs-mongocli
gen-docs-mongocli: ## Generate docs for mongocli commands
@echo "==> Generating docs for mongocli"
go run -ldflags "$(MCLI_LINKER_FLAGS)" ./tools/mongoclidocs/main.go
go run -ldflags "$(MCLI_LINKER_FLAGS)" -tags "$(BUILD_TAGS)" ./tools/mongoclidocs/main.go

.PHONY: gen-docs-atlascli
gen-docs-atlascli: ## Generate docs for atlascli commands
@echo "==> Generating docs for atlascli"
go run -ldflags "$(ATLAS_LINKER_FLAGS)" ./tools/atlasclidocs/main.go
go run -ldflags "$(ATLAS_LINKER_FLAGS)" -tags "$(BUILD_TAGS)" ./tools/atlasclidocs/main.go

.PHONY: build
build: build-mongocli ## Generate a binary for mongocli
Expand All @@ -132,46 +133,46 @@ build-all: build-mongocli build-atlascli ## Generate a binary for both CLIs
.PHONY: build-mongocli
build-mongocli: ## Generate a mongocli binary in ./bin
@echo "==> Building $(MCLI_BINARY_NAME) binary"
go build -ldflags "$(MCLI_LINKER_FLAGS)" -o $(MCLI_DESTINATION) $(MCLI_SOURCE_FILES)
go build -ldflags "$(MCLI_LINKER_FLAGS)" -tags "$(BUILD_TAGS)" -o $(MCLI_DESTINATION) $(MCLI_SOURCE_FILES)

.PHONY: build-atlascli
build-atlascli: ## Generate a atlascli binary in ./bin
@echo "==> Building $(ATLAS_BINARY_NAME) binary"
go build -ldflags "$(ATLAS_LINKER_FLAGS)" -o $(ATLAS_DESTINATION) $(ATLAS_SOURCE_FILES)
go build -ldflags "$(ATLAS_LINKER_FLAGS)" -tags "$(BUILD_TAGS)" -o $(ATLAS_DESTINATION) $(ATLAS_SOURCE_FILES)

.PHONY: build-debug
build-debug: build-mongocli-debug build-atlascli-debug ## Generate binaries in ./bin for debugging both CLIs

.PHONY: build-mongocli-debug
build-mongocli-debug: ## Generate a binary in ./bin for debugging mongocli
@echo "==> Building $(MCLI_BINARY_NAME) binary for debugging"
go build -gcflags="$(DEBUG_FLAGS)" -ldflags "$(MCLI_LINKER_FLAGS)" -o $(MCLI_DESTINATION) $(MCLI_SOURCE_FILES)
go build -gcflags="$(DEBUG_FLAGS)" -ldflags "$(MCLI_LINKER_FLAGS)" -tags "$(BUILD_TAGS)" -o $(MCLI_DESTINATION) $(MCLI_SOURCE_FILES)

.PHONY: build-atlascli-debug
build-atlascli-debug: ## Generate a binary in ./bin for debugging atlascli
@echo "==> Building $(ATLAS_BINARY_NAME) binary for debugging"
go build -gcflags="$(DEBUG_FLAGS)" -ldflags "$(ATLAS_LINKER_FLAGS)" -o $(ATLAS_DESTINATION) $(ATLAS_SOURCE_FILES)
go build -gcflags="$(DEBUG_FLAGS)" -ldflags "$(ATLAS_LINKER_FLAGS)" -tags "$(BUILD_TAGS)" -o $(ATLAS_DESTINATION) $(ATLAS_SOURCE_FILES)

.PHONY: e2e-test
e2e-test: build-all ## Run E2E tests
@echo "==> Running E2E tests..."
# the target assumes the MCLI_* environment variables are exported
$(TEST_CMD) -v -p 1 -parallel $(E2E_PARALLEL) -timeout $(E2E_TIMEOUT) -tags="$(E2E_TAGS)" ./test/e2e... $(E2E_EXTRA_ARGS)
$(TEST_CMD) -v -p 1 -parallel $(E2E_PARALLEL) -timeout $(E2E_TIMEOUT) -tags="$(E2E_TAGS) || $(BUILD_TAGS)" ./test/e2e... $(E2E_EXTRA_ARGS)

.PHONY: integration-test
integration-test: ## Run integration tests
@echo "==> Running integration tests..."
$(TEST_CMD) --tags="$(INTEGRATION_TAGS)" -count=1 ./internal...
$(TEST_CMD) --tags="$(INTEGRATION_TAGS) || $(BUILD_TAGS)" -count=1 ./internal...

.PHONY: fuzz-normalizer-test
fuzz-normalizer-test: ## Run fuzz test
@echo "==> Running fuzz test..."
$(TEST_CMD) -fuzz=Fuzz -fuzztime 50s --tags="$(UNIT_TAGS)" -race ./internal/kubernetes/operator/resources
$(TEST_CMD) -fuzz=Fuzz -fuzztime 50s --tags="$(UNIT_TAGS) || $(BUILD_TAGS)" -race ./internal/kubernetes/operator/resources

.PHONY: unit-test
unit-test: ## Run unit-tests
@echo "==> Running unit tests..."
$(TEST_CMD) --tags="$(UNIT_TAGS)" -race -cover -count=1 -coverprofile $(COVERAGE) ./...
$(TEST_CMD) --tags="$(UNIT_TAGS) || $(BUILD_TAGS)" -race -cover -count=1 -coverprofile $(COVERAGE) ./...

.PHONY: install
install: install-mongocli install-atlascli ## Install binaries in $GOPATH/bin for both CLIs
Expand All @@ -195,7 +196,7 @@ list: ## List all make targets
.PHONY: check-library-owners
check-library-owners: ## Check that all the dependencies in go.mod has a owner in library_owners.json
@echo "==> Check library_owners.json"
go run ./tools/libraryowners/main.go
go run -tags "$(BUILD_TAGS)" ./tools/libraryowners/main.go

.PHONY: update-atlas-sdk
update-atlas-sdk: ## Update the atlas-sdk dependency
Expand Down
Loading