forked from ibm-mas/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 1.03 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
#!/bin/bash
.PHONY: ansible-build ansible-install ansible tekton docker run clean create delete exec
.DEFAULT_GOAL := all
ansible-build:
ansible-galaxy collection build --output-path image/cli/install-ansible ../ansible-devops/ibm/mas_devops --force
mv image/cli/install-ansible/ibm-mas_devops-13.0.0.tar.gz image/cli/install-ansible/ibm-mas_devops.tar.gz
ansible-install:
ansible-galaxy collection install image/cli/install-ansible/ibm-mas_devops.tar.gz --force --no-deps
ansible: ansible-build ansible-install
tekton:
DEV_MODE=true build/bin/build-tekton.sh
docker:
docker build -t quay.io/ibmmas/cli:local image/cli
all: ansible tekton docker
run:
docker run -ti cli:local
clean:
rm image/cli/install-ansible/ibm-mas_devops.tar.gz
rm image/cli/bin/templates/ibm-mas-tekton.yaml
create:
oc apply -f tmp/deployment.yaml
delete:
oc delete pod $(shell oc get pods --selector app=mas-cli -o jsonpath="{.items[0].metadata.name}")
exec:
oc exec -ti $(shell oc get pods --selector app=mas-cli -o jsonpath="{.items[0].metadata.name}") -- bash