-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
42 lines (33 loc) · 1.21 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
.DEFAULT_GOAL := build
GIT_URL := https://github.com/tosin2013/qubinode_navigator.git
TAG := 0.1.0
INSTALL_PATH = ~/.ansible-navigator.yml
SOURCE_FILE = ~/qubinode_navigator/ansible-navigator/release-ansible-navigator.yml
INSTALL_ANSIBLE_NAVIGATOR := pip3 install ansible-navigator
BUILD_CMD := tag=$(TAG) && cd ~/qubinode_navigator/ansible-builder/ && ansible-builder build -f execution-environment.yml -t qubinode-installer:$${tag} -v 3
COPY_NAVIGATOR_CMD := cp $(SOURCE_FILE) $(INSTALL_PATH)
PODMAN_LOGIN := podman login registry.redhat.io
LIST_INVENTORY_CMD := ansible-navigator inventory --list -m stdout
REMOVE_BAD_BUILDS := podman rmi $$(podman images | grep "<none>" | awk '{print $$3}')
REMOVE_IMAGES := podman rmi $$(podman images | grep "qubinode-installer" | awk '{print $$3}')
.PHONY: install-ansible-navigator
install-ansible-navigator:
$(INSTALL_ANSIBLE_NAVIGATOR)
.PHONY: build-image
build-image:
$(BUILD_CMD)
.PHONY: podman-login
podman-login:
$(PODMAN_LOGIN)
.PHONY: copy-navigator
copy-navigator:
$(COPY_NAVIGATOR_CMD)
.PHONY: list-inventory
list-inventory:
$(LIST_INVENTORY_CMD)
.PHONY: remove-bad-builds
remove-bad-builds:
$(REMOVE_BAD_BUILDS)
.PHONY: remove-images
remove-images:
$(REMOVE_IMAGES)