forked from open-policy-agent/conftest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 853 Bytes
/
Makefile
File metadata and controls
38 lines (28 loc) · 853 Bytes
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
38
TAG=$(shell git describe --abbrev=0 --tags)
NAME=conftest
IMAGE=openpolicyagent/$(NAME)
ALT_IMAGE=instrumenta/$(NAME)
COMMAND=docker
BUILD=DOCKER_BUILDKIT=1 $(COMMAND) build --pull
PUSH=$(COMMAND) push
all: push
examples:
$(BUILD) --target examples -t $(IMAGE):examples .
$(COMMAND) tag $(IMAGE):examples $(ALT_IMAGE):examples
acceptance:
$(BUILD) --target acceptance .
conftest:
$(BUILD) -t $(IMAGE):$(TAG) .
$(COMMAND) tag $(IMAGE):$(TAG) $(IMAGE):latest
$(COMMAND) tag $(IMAGE):$(TAG) $(ALT_IMAGE):latest
$(COMMAND) tag $(IMAGE):$(TAG) $(ALT_IMAGE):$(TAG)
test: conftest
$(BUILD) --target test .
push: examples conftest
$(PUSH) $(IMAGE):$(TAG)
$(PUSH) $(IMAGE):latest
$(PUSH) $(ALT_IMAGE):$(TAG)
$(PUSH) $(ALT_IMAGE):latest
$(PUSH) $(IMAGE):examples
$(PUSH) $(ALT_IMAGE):examples
.PHONY: examples acceptance conftest push all