forked from ibm-mas/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (32 loc) · 1.36 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
43
44
#!/bin/bash
.PHONY: ansible-build ansible-install ansible python-build python-build-devops python-build-cli tekton docker run clean create delete exec
.DEFAULT_GOAL := all
ansible-build:
ansible-galaxy collection build --output-path image/cli/install ../ansible-devops/ibm/mas_devops --force
mv image/cli/install/ibm-mas_devops-100.0.0.tar.gz image/cli/install/ibm-mas_devops.tar.gz
ansible-install:
ansible-galaxy collection install image/cli/install/ibm-mas_devops.tar.gz --force --no-deps
ansible: ansible-build ansible-install
python-build-cli:
cd python && python3 -m build
cp python/dist/mas_cli-100.0.0.tar.gz image/cli/install/mas_cli.tar.gz
python-build-devops:
cd ../python-devops && python3 -m build
cp ../python-devops/dist/mas_devops-100.0.0.tar.gz image/cli/install/mas_devops.tar.gz
python-build: python-build-devops python-build-cli
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/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