Skip to content

Commit 0e0cc8f

Browse files
committed
Minor improvements to cleanup
1 parent ca5e1ba commit 0e0cc8f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

deploy/base-development.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,13 @@ fi
4242
# and if 'true' or 'false' is seen that is coerced to a bool which causes an issue
4343
export JBS_S3_SYNC_ENABLED="\"$JBS_S3_SYNC_ENABLED\""
4444

45-
kubectl delete --ignore-not-found deployments.apps hacbs-jvm-operator -n jvm-build-service
46-
kubectl delete --ignore-not-found deployments.apps jvm-build-workspace-artifact-cache
47-
4845
function cleanAllArtifacts() {
4946
# Following are created in CI code
5047
kubectl delete --ignore-not-found=true tasks.tekton.dev git-clone
5148
kubectl delete --ignore-not-found=true tasks.tekton.dev maven
5249
kubectl delete --ignore-not-found=true pipelines.tekton.dev sample-component-build
53-
kubectl delete --ignore-not-found=true clusterrolebindings.rbac.authorization.k8s.io pipeline-test-jvm-namespace
50+
kubectl delete --ignore-not-found=true clusterrolebindings.rbac.authorization.k8s.io pipeline-${JBS_WORKER_NAMESPACE}
51+
kubectl delete --ignore-not-found=true deployments.apps jvm-build-maven-repo -n ${JBS_WORKER_NAMESPACE}
5452

5553
kubectl delete --ignore-not-found=true artifactbuilds.jvmbuildservice.io --all
5654

@@ -61,6 +59,9 @@ function cleanAllArtifacts() {
6159
echo -e "\033[0;32mSetting context to $JBS_WORKER_NAMESPACE with quay image $JBS_QUAY_ORG\033[0m"
6260
# Its possible to set context before namespaces have been created.
6361
kubectl config set-context --current --namespace=$JBS_WORKER_NAMESPACE
62+
kubectl delete --ignore-not-found deployments.apps hacbs-jvm-operator -n jvm-build-service
63+
kubectl delete --ignore-not-found deployments.apps jvm-build-workspace-artifact-cache
64+
6465

6566
if [ "$1" = "--clean" ]; then
6667
cleanAllArtifacts

0 commit comments

Comments
 (0)