-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (31 loc) · 1.19 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
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2020
# 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)
build:
@docker-compose build --compress --force-rm
sudo -E $(DOCKER_CMD) image prune --force
deploy: undeploy
@docker-compose up --force-recreate --detach --no-build
logs:
@docker-compose logs --follow
undeploy:
@docker-compose down --remove-orphans
.PHONY: lint
lint:
sudo -E $(DOCKER_CMD) run --rm -v $$(pwd):/tmp/lint \
-e RUN_LOCAL=true \
-e LINTER_RULES_PATH=/ \
-e KUBERNETES_KUBEVAL_OPTIONS=--ignore-missing-schemas \
-e KUBERNETES_KUBECONFORM_OPTIONS='-ignore-missing-schemas' \
github/super-linter
tox -e lint
.PHONY: fmt
fmt:
sudo -E $(DOCKER_CMD) run --rm -u "$$(id -u):$$(id -g)" \
-v "$$(pwd):/mnt" -w /mnt mvdan/shfmt -l -w -i 4 -s .