Hi everyone,
I'm getting errors on these lines
|
SVC_STATUS_READY=$(kubectl get ksvc/${KUBE_SERVICE_NAME} -o json | jq '.status?.conditions[]?.status?|select(. == "True")') |
|
|
|
SVC_STATUS_NOT_READY=$(kubectl get ksvc/${KUBE_SERVICE_NAME} -o json | jq '.status?.conditions[]?.status?|select(. == "False")') |
|
|
|
SVC_STATUS_UNKNOWN=$(kubectl get ksvc/${KUBE_SERVICE_NAME} -o json | jq '.status?.conditions[]?.status?|select(. == "Unknown")') |
because sometimes the request kubectl get ksvc/${KUBE_SERVICE_NAME} -o json goes in error (for example: Unable to connect to the server: net/http: TLS handshake timeout)
I know that's not a script error, but to manage temporary server error I wrapped all calls with an if statement to avoid that all pipeline fails because all script is executed setting -e option
|
script: | |
|
#!/bin/bash |
|
set -e -o pipefail |
If it can help I open a pull request

Hi everyone,
I'm getting errors on these lines
code-engine-toolchain/.tekton/tasks/task-deploy-to-code-engine.yml
Lines 428 to 432 in ccd858e
because sometimes the request
kubectl get ksvc/${KUBE_SERVICE_NAME} -o jsongoes in error (for example: Unable to connect to the server: net/http: TLS handshake timeout)I know that's not a script error, but to manage temporary server error I wrapped all calls with an
if statementto avoid that all pipeline fails because all script is executed setting -e optioncode-engine-toolchain/.tekton/tasks/task-deploy-to-code-engine.yml
Lines 122 to 124 in ccd858e
If it can help I open a pull request