diff --git a/.ci/helm.sh b/.ci/helm.sh index 596d5f0..f4fe87c 100644 --- a/.ci/helm.sh +++ b/.ci/helm.sh @@ -91,12 +91,12 @@ function ci::collect_k8s_logs() { echo "Collecting k8s logs to ${K8S_LOGS_DIR}" for k8sobject in $(${KUBECTL} get pods,jobs -n ${NAMESPACE} -l app=pulsar -o=name); do filebase="${k8sobject//\//_}" - ${KUBECTL} logs -n ${NAMESPACE} "$k8sobject" --all-containers=true --ignore-errors=true --prefix=true > "${filebase}.$$.log.txt" - ${KUBECTL} logs -n ${NAMESPACE} "$k8sobject" --all-containers=true --ignore-errors=true --prefix=true --previous=true > "${filebase}.previous.$$.log.txt" + ${KUBECTL} logs -n ${NAMESPACE} "$k8sobject" --all-containers=true --ignore-errors=true --prefix=true > "${filebase}.$$.log.txt" || true + ${KUBECTL} logs -n ${NAMESPACE} "$k8sobject" --all-containers=true --ignore-errors=true --prefix=true --previous=true > "${filebase}.previous.$$.log.txt" || true done; - ${KUBECTL} get events --sort-by=.lastTimestamp -A > events.$$.log.txt - ${KUBECTL} get events --sort-by=.lastTimestamp -A -o yaml > events.$$.log.yaml - ${KUBECTL} get -n ${NAMESPACE} all -o yaml > k8s_resources.$$.yaml + ${KUBECTL} get events --sort-by=.lastTimestamp -A > events.$$.log.txt || true + ${KUBECTL} get events --sort-by=.lastTimestamp -A -o yaml > events.$$.log.yaml || true + ${KUBECTL} get -n ${NAMESPACE} all -o yaml > k8s_resources.$$.yaml || true } function ci::install_pulsar_chart() { diff --git a/.github/workflows/pulsar.yml b/.github/workflows/pulsar.yml index f771fa8..bb04027 100644 --- a/.github/workflows/pulsar.yml +++ b/.github/workflows/pulsar.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_bk_tls.yml b/.github/workflows/pulsar_bk_tls.yml index a27c4b8..a92e5bd 100644 --- a/.github/workflows/pulsar_bk_tls.yml +++ b/.github/workflows/pulsar_bk_tls.yml @@ -55,6 +55,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_broker_tls.yml b/.github/workflows/pulsar_broker_tls.yml index 0972664..d466569 100644 --- a/.github/workflows/pulsar_broker_tls.yml +++ b/.github/workflows/pulsar_broker_tls.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_function.yml b/.github/workflows/pulsar_function.yml index 6b51c61..4340283 100644 --- a/.github/workflows/pulsar_function.yml +++ b/.github/workflows/pulsar_function.yml @@ -58,6 +58,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_image.yml b/.github/workflows/pulsar_image.yml index fb3c21d..aeb3e22 100644 --- a/.github/workflows/pulsar_image.yml +++ b/.github/workflows/pulsar_image.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_jwt_asymmetric.yml b/.github/workflows/pulsar_jwt_asymmetric.yml index 9204de9..9eae040 100644 --- a/.github/workflows/pulsar_jwt_asymmetric.yml +++ b/.github/workflows/pulsar_jwt_asymmetric.yml @@ -58,6 +58,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_jwt_symmetric.yml b/.github/workflows/pulsar_jwt_symmetric.yml index cd384f2..2c7ee65 100644 --- a/.github/workflows/pulsar_jwt_symmetric.yml +++ b/.github/workflows/pulsar_jwt_symmetric.yml @@ -58,6 +58,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_tls.yml b/.github/workflows/pulsar_tls.yml index e06fba4..d498681 100644 --- a/.github/workflows/pulsar_tls.yml +++ b/.github/workflows/pulsar_tls.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_zk_tls.yml b/.github/workflows/pulsar_zk_tls.yml index 31ab667..ce2ee13 100644 --- a/.github/workflows/pulsar_zk_tls.yml +++ b/.github/workflows/pulsar_zk_tls.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure diff --git a/.github/workflows/pulsar_zkbk_tls.yml b/.github/workflows/pulsar_zkbk_tls.yml index bda131c..4f14192 100644 --- a/.github/workflows/pulsar_zkbk_tls.yml +++ b/.github/workflows/pulsar_zkbk_tls.yml @@ -56,6 +56,7 @@ jobs: shell: bash run: | source .ci/helm.sh + set +e ci::collect_k8s_logs - name: Upload k8s logs on failure