forked from knative-extensions/kn-plugin-event
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
37 lines (30 loc) · 846 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(dir $(mkfile_path))
CI ?= false
PROW_JOB_ID ?= 0
PROW = $(shell [ "$(CI)" = "true" ] && [ "$(PROW_JOB_ID)" != "0" ] && echo "true" || echo "false")
ifeq ($(PROW),true)
# Openshift CI runs as high UID user
export HOME = /tmp
export GOPATH = /tmp/go
# Reset the goflags to avoid the -mod=vendor flag
export GOFLAGS =
endif
build:
./mage build
.PHONY: build
unit:
./mage test
.PHONY: unit
test: unit
.PHONY: test
e2e:
openshift/e2e-tests.sh
.PHONY: e2e
dockerfiles:
go run github.com/openshift-knative/hack/cmd/generate@latest \
--root-dir "$(current_dir)" \
--generators dockerfile \
--app-file-fmt "/usr/bin/%s" \
--dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.17"
.PHONY: dockerfiles