Skip to content

Commit 088608c

Browse files
committed
Add ocp-deploy and ocp-deploy-cleanup targets
Similar to `kuttl-test-ocp` that deploys and runs kuttl we now add a couple of convenient make targets to help development: - `ocp-deploy` - `ocp-deploy-cleanup`
1 parent 9f301ec commit 088608c

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ openstack-lightspeed-deploy: ## Deploy using a catalog image.
219219
oc apply -f $(OUTPUT_DIR)/rhosls
220220
bash scripts/confirm-rhosls-running.sh
221221

222-
# Deploy using the catalog image.
222+
# Undeploy using the catalog image.
223+
# Remove OpenStackLightspeds so the namespace deletion doesn't get stuck
223224
.PHONY: openstack-lightspeed-undeploy
224225
openstack-lightspeed-undeploy: export OUTPUT_DIR = out
225226
openstack-lightspeed-undeploy: ## Undeploy using a catalog image.
227+
oc delete openstacklightspeed --all -n openstack-lightspeed --ignore-not-found=true --timeout=120s
226228
find out/{catalog,rhosls} -name "*.yaml" -printf " -f %p" | xargs oc delete --ignore-not-found=true
227229

228230
CATALOG_NAME ?= openstack-lightspeed-catalog
@@ -299,6 +301,20 @@ kuttl-test-ocp: BUNDLE_IMG = $(OCP_INTERNAL_REGISTRY)/openshift-marketplace/oper
299301
kuttl-test-ocp: CATALOG_IMG = $(OCP_INTERNAL_REGISTRY)/openshift-marketplace/operator-catalog:$(TAG)
300302
kuttl-test-ocp: docker-build bundle bundle-build ocp-catalog-build ocp-registry-push kuttl-test-run
301303

304+
.PHONY: ocp-deploy
305+
ocp-deploy: IMG = $(OCP_INTERNAL_REGISTRY)/$(OCP_REGISTRY_NAMESPACE)/operator:latest
306+
ocp-deploy: BUNDLE_IMG = $(OCP_INTERNAL_REGISTRY)/openshift-marketplace/operator-bundle:$(TAG)
307+
ocp-deploy: CATALOG_IMG = $(OCP_INTERNAL_REGISTRY)/openshift-marketplace/operator-catalog:$(TAG)
308+
ocp-deploy: docker-build bundle bundle-build ocp-catalog-build ocp-registry-push openstack-lightspeed-deploy ## Build, push, and deploy the operator on an OCP cluster.
309+
310+
.PHONY: ocp-deploy-cleanup
311+
ocp-deploy-cleanup: IMG = $(OCP_INTERNAL_REGISTRY)/$(OCP_REGISTRY_NAMESPACE)/operator:latest
312+
ocp-deploy-cleanup: BUNDLE_IMG = $(OCP_INTERNAL_REGISTRY)/openshift-marketplace/operator-bundle:$(TAG)
313+
ocp-deploy-cleanup: CATALOG_IMG = $(OCP_INTERNAL_REGISTRY)/openshift-marketplace/operator-catalog:$(TAG)
314+
ocp-deploy-cleanup: openstack-lightspeed-undeploy ## Clean up everything created by ocp-deploy.
315+
oc delete imagestreamtag operator-catalog:$(TAG) -n openshift-marketplace --ignore-not-found=true
316+
oc delete namespace $(OCP_REGISTRY_NAMESPACE) --ignore-not-found=true --wait
317+
302318
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
303319
# $1 - target path with name of binary
304320
# $2 - package url which can be installed

0 commit comments

Comments
 (0)