Zack Williams | 0171fb3 | 2021-09-08 22:31:54 -0700 | [diff] [blame^] | 1 | # infra-containers Makefile |
| 2 | |
| 3 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
| 6 | SHELL = bash -eu -o pipefail |
| 7 | |
| 8 | BASE_TAG := onfinfra/ |
| 9 | |
| 10 | # print help by default |
| 11 | .DEFAULT_GOAL := help |
| 12 | |
| 13 | # phony (doesn't make files) targets |
| 14 | .PHONY: test docker-build docker-push |
| 15 | |
| 16 | docker-build: |
| 17 | docker build -t $(BASE_TAG)molecule-systemd:debian-11 molecule-systemd/debian-11 |
| 18 | |
| 19 | docker-push: |
| 20 | docker push $(BASE_TAG)molecule-systemd:debian-11 |
| 21 | |
| 22 | lint: ## run linters (hadolint) on Dockerfiles |
| 23 | hadolint --version |
| 24 | hadolint */*/Dockerfile |
| 25 | |
| 26 | test: lint ## run tests (only lint for now) |
| 27 | |
| 28 | license: ## check licenses |
| 29 | reuse --version ;\ |
| 30 | reuse --root . lint |
| 31 | |
| 32 | help: ## Print help for each target |
| 33 | @echo infra-containers make targets |
| 34 | @echo |
| 35 | @grep '^[[:alnum:]_-]*:.* ## ' $(MAKEFILE_LIST) \ |
| 36 | | sort | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s %s\n", $$1, $$2};' |