-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (24 loc) · 1.01 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
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2021
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
DOCKER_CMD ?= $(shell which docker 2> /dev/null || which podman 2> /dev/null || echo docker)
IMAGE_VERSION ?= $(shell git describe --abbrev=0 --tags)
IMAGE_NAME=gwtester/infra:$(IMAGE_VERSION)
.PHONY: build
build:
sudo -E $(DOCKER_CMD) build -t $(IMAGE_NAME) .
sudo -E $(DOCKER_CMD) image prune --force
push: build
docker-squash $(IMAGE_NAME)
sudo -E $(DOCKER_CMD) push $(IMAGE_NAME)
.PHONY: lint
lint:
sudo -E $(DOCKER_CMD) run -e RUN_LOCAL=true --rm \
-e LINTER_RULES_PATH=/ \
-e VALIDATE_KUBERNETES_KUBEVAL=false \
-v $$(pwd):/tmp/lint github/super-linter