Skip to content

Commit

Permalink
Merge pull request #2753 from fabriziopandini/small-improvements-to-d…
Browse files Browse the repository at this point in the history
…ev-workflow

🌱 Small improvements to dev workflow
  • Loading branch information
openshift-merge-robot committed Feb 6, 2023
2 parents cc878df + a43bada commit e50fa57
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ contrib/demo/clusters/kind/*.kubeconfig
coverage.*
tools
build
.vscode

# JetBrains IDE files
.idea/
*.iml

# VSCode
.vscode/
*.code-workspace

# Common editor / temporary files
.DS_Store

# Folder where each developer can store temporary files
tmp
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ TOOLS_GOBIN_DIR := $(abspath $(TOOLS_DIR))
GOBIN_DIR=$(abspath ./bin)
PATH := $(GOBIN_DIR):$(TOOLS_GOBIN_DIR):$(PATH)
TMPDIR := $(shell mktemp -d)
KIND_CLUSTER_NAME ?= kind

# Detect the path used for the install target
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -114,11 +115,11 @@ build-all:

.PHONY: build-kind-images
build-kind-images-ko: require-ko
$(eval SYNCER_IMAGE=$(shell KO_DOCKER_REPO=kind.local ko build --platform=linux/$(ARCH) ./cmd/syncer))
$(eval TEST_IMAGE=$(shell KO_DOCKER_REPO=kind.local ko build --platform=linux/$(ARCH) ./test/e2e/fixtures/kcp-test-image))
$(eval SYNCER_IMAGE=$(shell KO_DOCKER_REPO=kind.local KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) ko build --platform=linux/$(ARCH) ./cmd/syncer))
$(eval TEST_IMAGE=$(shell KO_DOCKER_REPO=kind.local KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) ko build --platform=linux/$(ARCH) ./test/e2e/fixtures/kcp-test-image))
build-kind-images: build-kind-images-ko
test -n "$(SYNCER_IMAGE)" || (echo Failed to create syncer image; exit 1)
test -n "$(TEST_IMAGE)" || (echo Failed to create test image; exit 1)
@test -n "$(SYNCER_IMAGE)" && (echo $(SYNCER_IMAGE) pushed to "$(KIND_CLUSTER_NAME)" kind cluster) || (echo Failed to create syncer image and/or to push it to "$(KIND_CLUSTER_NAME)" kind cluster; exit 1)
@test -n "$(TEST_IMAGE)" && (echo $(TEST_IMAGE) pushed to "$(KIND_CLUSTER_NAME)" kind cluster) || (echo Failed to create test image and and/or to push it to "$(KIND_CLUSTER_NAME)" kind cluster; exit 1)

install: WHAT ?= ./cmd/...
install:
Expand Down

0 comments on commit e50fa57

Please sign in to comment.