From 5b71df10aeb8e1e7a66d34b8320d6ee7204ba4d7 Mon Sep 17 00:00:00 2001 From: timflannagan Date: Fri, 16 Apr 2021 17:07:19 -0400 Subject: [PATCH] Makefile: Add target for verifying vendor inside of the build root container image --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 72e8e84a98..658e23e6c8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ SHELL := /bin/bash ROOT_DIR:= $(patsubst %/,%,$(dir $(realpath $(lastword $(MAKEFILE_LIST))))) CONTAINER_ENGINE := docker +CONTAINER_RUNTIME_RUN_OPTS := + +SRC_IMAGE_REPO := quay.io/openshift/operator-framework-olm +SRC_IMAGE_TAG := latest OPM_VERSION := $(or $(SOURCE_GIT_TAG),$(shell git describe --always --tags HEAD)) BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') @@ -81,6 +85,9 @@ build/olm-container: build/registry-container: $(CONTAINER_ENGINE) build -f operator-registry.Dockerfile -t test:test . +build/src: + $(CONTAINER_ENGINE) build -f base.Dockerfile -t $(SRC_IMAGE_REPO):$(SRC_IMAGE_TAG) $(ROOT_DIR) + bin/kubebuilder: $(ROOT_DIR)/scripts/install_kubebuilder.sh @@ -118,6 +125,16 @@ vendor: sanity: $(MAKE) vendor && git diff --stat HEAD --ignore-submodules --exit-code +sanity/src: + $(CONTAINER_ENGINE) run \ + --rm \ + -t \ + $(CONTAINER_RUNTIME_RUN_OPTS) \ + -w /go/src/github.com/openshift/operator-framework-olm \ + -v $(PWD):/go/src/github.com/openshift/operator-framework-olm \ + $(SRC_IMAGE_REPO):$(SRC_IMAGE_TAG) \ + make sanity + manifests: vendor ## Generate manifests ./scripts/generate_crds_manifests.sh