Skip to content

Commit

Permalink
Makefile: Add target for verifying vendor inside of the build root co…
Browse files Browse the repository at this point in the history
…ntainer image
  • Loading branch information
timflannagan committed Apr 16, 2021
1 parent 66c6989 commit 5b71df1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 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')
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5b71df1

Please sign in to comment.