ibm-mas/ansible-airgap

Do not wait on TektonConfig when OpenShift 4.6

Closed this issue · 0 comments

When I use mascli to install MAS 8.7 on OpenShift 4.6 the function pipeline_install_operator hangs on "oc get TektonConfig config". Apparently there is no TektonConfig CRD when installed on OpenShift 4.6.

Therefore lines 25 through 38 of bin/functions/pipeline_install_operator should not execute when installing on OpenShift 4.6

 25  echo "Wait for Tekton config to be available" &>> $LOGFILE
 26  oc get TektonConfig config &>> $LOGFILE
 27  LOOKUP_RESULT=$?
 28  while [ "$LOOKUP_RESULT" == "1" ]; do
 29    echo "Waiting 5s for TektonConfig to be created before checking again ..." &>> $LOGFILE
 30    sleep 5
 31    oc get TektonConfig config &>> $LOGFILE
 32    LOOKUP_RESULT=$?
 33  done
 34 
 35  # This will have no effect on OCP 4.8 ... OpenShift Pipelines doesn't support configuration properly at this level
 36  # Note: We need to use --tpye merge because it's a custom resource
 37  echo "Patch Tekton config to enable alpha API fields and scope when expressions to tasks" &>> $LOGFILE
 38  oc patch TektonConfig config --type merge -p '{"spec":{"pipeline":{"enable-api-fields": "alpha", "scope-when-expressions-to-task": true}}}'  &>> $LOGFILE