Skip to content

Commit

Permalink
do not update existing servicebrokers
Browse files Browse the repository at this point in the history
  • Loading branch information
Schnitzel committed Dec 31, 2018
1 parent 3ed91e7 commit c54a97a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion images/oc-build-deploy-dind/build-deploy-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ do
OPENSHIFT_TEMPLATE=$OPENSHIFT_SERVICES_TEMPLATE
TEMPLATE_PARAMETERS+=(-p SERVICEBROKER_NAME="${MAP_SERVICE_NAME_TO_SERVICEBROKERS_NAME["${SERVICE_NAME}"]}")
TEMPLATE_PARAMETERS+=(-p SERVICEBROKER_PLAN_NAME="${MAP_SERVICE_NAME_TO_SERVICEBROKERS_PLAN_NAME["${SERVICE_NAME}"]}")
. /oc-build-deploy/scripts/exec-openshift-resources.sh
. /oc-build-deploy/scripts/exec-openshift-create-servicebroker.sh
SERVICEBROKERS+=("${SERVICE_NAME}:${SERVICE_TYPE}")
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

if oc --insecure-skip-tls-verify -n ${OPENSHIFT_PROJECT} get servicebroker "${SERVICE_NAME}" &> /dev/null; then
echo "ServiceBroker ${SERVICE_NAME} already existing, not attempting to update"
else
oc process --local -o yaml --insecure-skip-tls-verify \
-n ${OPENSHIFT_PROJECT} \
-f ${OPENSHIFT_TEMPLATE} \
-p SERVICE_NAME="${SERVICE_NAME}" \
-p SAFE_BRANCH="${SAFE_BRANCH}" \
-p SAFE_PROJECT="${SAFE_PROJECT}" \
-p BRANCH="${BRANCH}" \
-p PROJECT="${PROJECT}" \
-p LAGOON_GIT_SHA="${LAGOON_GIT_SHA}" \
-p SERVICE_ROUTER_URL="${SERVICE_ROUTER_URL}" \
-p REGISTRY="${OPENSHIFT_REGISTRY}" \
-p OPENSHIFT_PROJECT=${OPENSHIFT_PROJECT} \
"${TEMPLATE_PARAMETERS[@]}" \
| outputToYaml
fi

0 comments on commit c54a97a

Please sign in to comment.