-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (25 loc) · 872 Bytes
/
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
VERSION = 1.0.0
BUILD_NAMESPACE = devsecops-config
.PHONY: namespace
namespace:
oc new-project ${BUILD_NAMESPACE}
.PHONY: install
install: install_tasks install_pipelines
oc policy add-role-to-user system:image-builder \
system:serviceaccount:${BUILD_NAMESPACE}:builder \
--namespace=openshift
oc apply -f image-builder/builder.yaml
oc apply -f pipelines/config/pipelines.yaml
oc apply -f pipelines/config/rolebindings.yaml
.PHONY: install_pipelines
install_pipelines:
oc apply -n ${BUILD_NAMESPACE} -f pipelines/build/
oc apply -n ${BUILD_NAMESPACE} -f pipelines/rollout/
.PHONY: install_tasks
install_tasks:
oc apply -f pipelines/clustertasks/
.PHONY: cleanup
cleanup:
oc delete build --all -n ${BUILD_NAMESPACE}
oc delete pipelineruns,taskruns --all -n ${BUILD_NAMESPACE}
oc delete pod --field-selector=status.phase==Succeeded -n ${BUILD_NAMESPACE}