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 @@ -24,7 +24,8 @@ ifeq ($(NO_DOCKER), 1)
DOCKER_CMD =
IMAGE_BUILD_CMD = imagebuilder
else
DOCKER_CMD := docker run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator golang:1.13
DOCKER_CMD := docker run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator golang:1.15
# DOCKER_CMD := docker run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you going to leave this in for reference to the rhel stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for now. If you want to test with the same image we build with, comment/uncomment those lines. Possibly in the future make it more configurable, but it want people that don't have a CI registry pull secret to be able to build and test our bits.

IMAGE_BUILD_CMD = docker build
endif

Expand Down Expand Up @@ -112,7 +113,7 @@ deploy-kubemark:
.PHONY: test
test: ## Run tests
@echo -e "\033[32mTesting...\033[0m"
$(DOCKER_CMD) KUBEBUILDER_CONTROLPLANE_START_TIMEOUT=10m hack/ci-test.sh
$(DOCKER_CMD) hack/ci-test.sh

unit:
$(DOCKER_CMD) go test ./pkg/... ./cmd/...
Expand Down
2 changes: 1 addition & 1 deletion hack/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ cd $REPO_ROOT && \
source ./hack/fetch_ext_bins.sh && \
fetch_tools && \
setup_envs && \
make unit
NO_DOCKER=1 make unit
6 changes: 5 additions & 1 deletion hack/fetch_ext_bins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ function fetch_tools {
kb_tools_download_url="https://storage.googleapis.com/kubebuilder-tools/$kb_tools_archive_name"

kb_tools_archive_path="$tmp_root/$kb_tools_archive_name"
echo "download url: ${kb_tools_download_url}"
if [ ! -f $kb_tools_archive_path ]; then
echo "downloading kubebuilder"
echo "archive path: $kb_tools_archive_path"
curl -fsL ${kb_tools_download_url} -o "$kb_tools_archive_path"
fi

ls $tmp_root/
echo "temp root: $tmp_root"
tar -zvxf "$kb_tools_archive_path" -C "$tmp_root/"
}

Expand Down