This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch fix-spaces-in-windows in repository https://gitbox.apache.org/repos/asf/openserverless-task.git
commit 9a8538a005055f852c5b9e568db3ba2e13666e1d Author: Michele Sciabarra <[email protected]> AuthorDate: Sat Aug 16 11:07:02 2025 +0200 fixes for spaces in home dir --- admin/opsfile.yml | 4 ++-- debug/test/opsfile.yml | 35 +++++++++++++++++++++++++++++++++++ setup/kubernetes/opsfile.yml | 9 +++++---- setup/nuvolaris/opsfile.yml | 10 +++++----- setup/nuvolaris/streamer/opsfile.yml | 10 +++------- util/opsfile.yml | 6 +++--- 6 files changed, 53 insertions(+), 21 deletions(-) diff --git a/admin/opsfile.yml b/admin/opsfile.yml index ab453d6..0898a4b 100644 --- a/admin/opsfile.yml +++ b/admin/opsfile.yml @@ -22,8 +22,8 @@ vars: env: KUBECONFIG: sh: | - if test -e $OPS_TMP/kubeconfig - then echo $OPS_TMP/kubeconfig + if test -e "$OPS_TMP/kubeconfig" + then echo "$OPS_TMP/kubeconfig" else echo ~/.kube/config fi diff --git a/debug/test/opsfile.yml b/debug/test/opsfile.yml new file mode 100644 index 0000000..0baf667 --- /dev/null +++ b/debug/test/opsfile.yml @@ -0,0 +1,35 @@ +version: "3" + +vars: + RETRY: 100 + TIMEOUT: 10s + CONTEXT: "" + +env: + KUBECONFIG: + sh: |- + if test -e "$OPS_TMP/kubeconfig" + then echo "$OPS_TMP/kubeconfig" + else echo ~/.kube/config + fi + +tasks: + + main: + desc: test me + cmds: + - echo kube= {{.KUBECONFIG}} + - echo $KUBECONFIG + - kubectl get nodes + - kubectl -n nuvolaris get po -l app=minio -o jsonpath='{.items[0].metadata.name}' + - echo "object={{.OBJECT}}" + + + sub: + desc: sub + cmds: + - kubectl -n nuvolaris get po -l app=minio -o jsonpath='{.items[0].metadata.name}' >_pod + - task: main + vars: + OBJECT: + sh: echo "pod/$(cat _pod)" diff --git a/setup/kubernetes/opsfile.yml b/setup/kubernetes/opsfile.yml index 2de3099..fe22f90 100644 --- a/setup/kubernetes/opsfile.yml +++ b/setup/kubernetes/opsfile.yml @@ -25,8 +25,8 @@ vars: env: KUBECONFIG: sh: |- - if test -e "$OPS_TMP{{if eq .OS "windows"}}\{{else}}/{{end}}kubeconfig" - then echo "$OPS_TMP{{if eq .OS "windows"}}\{{else}}/{{end}}kubeconfig" + if test -e "$OPS_TMP/kubeconfig" + then echo "$OPS_TMP/kubeconfig" else echo ~/.kube/config fi @@ -205,7 +205,7 @@ tasks: vars: OP_VOL_STORAGE_CLASS: sh: | - echo $(kubectl get storageclass -ojsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class=='true')].metadata.name}") + echo $(kubectl --kubeconfig="$KUBECONFIG" get storageclass -ojsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class=='true')].metadata.name}") cmds: - echo "export OPERATOR_VOLUME_STORAGE_CLASS={{.OP_VOL_STORAGE_CLASS}}" @@ -274,10 +274,11 @@ tasks: OBJECT: po/nuvolaris-mongodb-0 COND: sh: echo "$OPERATOR_COMPONENT_MONGODB" + - kubectl -n nuvolaris get po -l app=minio -o jsonpath='{.items[0].metadata.name}' >_minio - task: wait vars: OBJECT: - sh: echo "pod/$(kubectl -n nuvolaris get po -l app=minio -o jsonpath='{.items[0].metadata.name}')" + sh: echo "pod/$(cat _minio)" COND: sh: echo "$OPERATOR_COMPONENT_MINIO" - task: wait diff --git a/setup/nuvolaris/opsfile.yml b/setup/nuvolaris/opsfile.yml index b26d2bc..558beed 100644 --- a/setup/nuvolaris/opsfile.yml +++ b/setup/nuvolaris/opsfile.yml @@ -31,8 +31,8 @@ vars: env: KUBECONFIG: sh: | - if test -e $OPS_TMP/kubeconfig - then echo $OPS_TMP/kubeconfig + if test -e "$OPS_TMP/kubeconfig" + then echo "$OPS_TMP/kubeconfig" else echo ~/.kube/config fi @@ -111,13 +111,13 @@ tasks: test "$ANNOT_VALUE" = "{{.EXPECTED_VALUE}}" && RES=true || RES=false break fi - printf "\n" done + printf "\n" $RES config: #desc: configuring nuvolaris - silent: false + silent: true cmds: - | export OPSDEV_APIHOST=$(kubectl --kubeconfig="$KUBECONFIG" -n nuvolaris get cm/config -o jsonpath='{.metadata.annotations.apihost}') @@ -211,7 +211,7 @@ tasks: sleep: desc: sleep - silent: false + silent: true cmds: - "{{.RUN}} wsk action update sleep sleep.js --web=true --timeout 300000" #- "{{.RUN}}wsk action invoke sleep -p sleep {{.SLEEP}} -r" diff --git a/setup/nuvolaris/streamer/opsfile.yml b/setup/nuvolaris/streamer/opsfile.yml index a1152ea..97a7a8a 100644 --- a/setup/nuvolaris/streamer/opsfile.yml +++ b/setup/nuvolaris/streamer/opsfile.yml @@ -28,12 +28,8 @@ env: KUBECONFIG: sh: |- - #if test -e "${OPS_TMP//\\//}/kubeconfig" - #then echo "${OPS_TMP//\\//}/kubeconfig" - #else echo ~/.kube/config - #fi - if test -e ~/.ops/tmp/kubeconfig - then echo ~/.ops/tmp/kubeconfig + if test -e "$OPS_TMP/kubeconfig" + then echo "$OPS_TMP/kubeconfig" else echo ~/.kube/config fi @@ -61,7 +57,7 @@ tasks: - echo "$host.Name" deploy: - silent: false + silent: true ignore_error: false desc: deploy the streamer cmds: diff --git a/util/opsfile.yml b/util/opsfile.yml index c6b264a..85f0ac8 100644 --- a/util/opsfile.yml +++ b/util/opsfile.yml @@ -150,12 +150,12 @@ tasks: # removing the '--' at the beginning required to pass extra flags test "$1" = "--" && shift # execute the command line as passed and expanded - kubectl "$@" + kubectl -n nuvolaris "$@" env: KUBECONFIG: sh: |- - if test -e $OPS_TMP/kubeconfig - then echo $OPS_TMP/kubeconfig + if test -e "$OPS_TMP/kubeconfig" + then echo "$OPS_TMP/kubeconfig" else echo ~/.kube/config fi
