message: feat: check if scc is present and prevent patching the build pod, this is for openshift4
diff: @@ -76,6 +76,8 @@ function featureFlag() {
  echo "${!defaultFlagVar}"
  }
  +SCC_CHECK=$(kubectl get --insecure-skip-tls-verify -n ${4} pod ${LAGOON_BUILD_NAME} -o json | jq -r '.metadata.annotations."openshift.io/scc" // false')
  +
  function patchBuildStep() {
  [ "$1" ] || return #total start time
  [ "$2" ] || return #step start time
  @@ -99,11 +101,13 @@ function patchBuildStep() {
  echo "##############################################"
  # patch the buildpod with the buildstep
  + if [ "${SCC_CHECK}" == false ]; then
  kubectl patch --insecure-skip-tls-verify -n ${4} pod ${LAGOON_BUILD_NAME} \
  -p "{\"metadata\":{\"labels\":{\"lagoon.sh/buildStep\":\"${5}\"}}}"
  # tiny sleep to allow patch to complete before logs roll again
  sleep 0.5s
  + fi
  }
  ##############################################
  