-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (46 loc) · 1.84 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SHELL = /bin/bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
##@ General
# help target is based on https://github.com/operator-framework/operator-sdk/blob/master/release/Makefile.
.DEFAULT_GOAL := help
help: ## Show this help screen.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: help
.PHONY: lint-shell
##@ Building
images: image-node18-npm-toolset ## Build images.
.PHONY: images
image-node18-npm-toolset: ## Build node18-npm-toolset image.
docker build \
-f build/images/Dockerfile.node18-npm-toolset \
-t localhost:5000/ods-pipeline/node18-npm-toolset \
.
.PHONY: image-node18-npm-toolset
tasks: ## Render tasks. Use VERSION=1.0.0 make tasks to render specific version.
go run github.com/opendevstack/ods-pipeline/cmd/taskmanifest \
-data ImageRepository=ghcr.io/opendevstack/ods-pipeline-npm \
-data Version=$$(cat version) \
-template build/tasks/build.yaml \
-destination tasks/build.yaml
.PHONY: tasks
docs: tasks ## Render documentation for tasks.
go run github.com/opendevstack/ods-pipeline/cmd/taskdoc \
-task tasks/build.yaml \
-description build/docs/build.adoc \
-destination docs/build.adoc
.PHONY: docs
##@ Testing
test: test-e2e ## Run complete testsuite.
.PHONY: test
test-e2e: ## Run testsuite of end-to-end task runs.
go test -v -count=1 -timeout 10m ./test/e2e/...
.PHONY: test-e2e
##@ CI
check-docs: docs ## Check docs are up-to-date
@printf "Docs / tasks are " && git diff --quiet docs tasks && echo "up-to-date." || (echo "not up-to-date! Run 'make docs' to update."; false)
.PHONY: check-docs
ci: check-docs test ## Run CI tasks
.PHONY: ci