Set package initial status if its empty (#1522)
If the user applies package YAML file has no status field, the package won't be able to be compiled or deployed due to lack of status. This PR aims to add a check at buildermgr to set initial package status to those packages.
This commit is contained in:
@@ -152,6 +152,24 @@ waitBuild() {
|
||||
}
|
||||
export -f waitBuild
|
||||
|
||||
waitBuildExpectedStatus() {
|
||||
pkg=$1
|
||||
status=$2
|
||||
|
||||
log "Waiting for builder manager to finish the build with status $status"
|
||||
|
||||
set +e
|
||||
while true; do
|
||||
kubectl --namespace default get packages $pkg -o jsonpath='{.status.buildstatus}'|grep $status
|
||||
if [[ $? -eq 0 ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
set -e
|
||||
}
|
||||
export -f waitBuildExpectedStatus
|
||||
|
||||
|
||||
## Common env parameters
|
||||
export FISSION_NAMESPACE=${FISSION_NAMESPACE:-fission}
|
||||
|
||||
Reference in New Issue
Block a user