Skip to content

Commit fd473e5

Browse files
committed
Fix: Fail when nested pipeline fails
1 parent 448d14e commit fd473e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

integration-tests/pipelines/e2e-main-pipeline.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ spec:
103103
set -euo pipefail
104104
105105
GIT_REPO="$(jq -r '.git.repo // empty' <<< $JOB_SPEC)"
106+
KONFLUX_TENANT="${KONFLUX_NAMESPACE%-tenant}"
106107
107108
if [[ "${GIT_REPO}" = "rhtap-cli" ]]; then
108109
REPO_ORG=$(jq -r '.git.source_repo_org' <<< $JOB_SPEC)
@@ -144,8 +145,6 @@ spec:
144145
--prefix-name "e2e-$OCP_VERSION"\
145146
-o name)
146147
147-
KONFLUX_TENANT="${KONFLUX_NAMESPACE%-tenant}"
148-
149148
echo "Started new pipelinerun: https://console.redhat.com/application-pipeline/workspaces/${KONFLUX_TENANT}/applications/${KONFLUX_APPLICATION_NAME}/pipelineruns/${pipeline_run_name}"
150149
151150
PIPELINERUNS_ARRAY+=($pipeline_run_name)
@@ -182,11 +181,11 @@ spec:
182181
## Explore and report status of all failed pipelineruns. Fail if anything failed
183182
SOME_PIPELINE_FAILED=false
184183
for PIPELINE_RUN in "${PIPELINERUNS_ARRAY[@]}"; do
185-
if [[ $(oc get pipelinerun/$PIPELINE_RUN -n ${KONFLUX_NAMESPACE} -o jsonpath="{.status.conditions[?(@.type==\"Succeeded\")].status}") == "Failed" ]]; then
184+
if [[ $(oc get pipelinerun/$PIPELINE_RUN -n ${KONFLUX_NAMESPACE} -o jsonpath="{.status.conditions[?(@.type==\"Succeeded\")].status}") == "False" ]]; then
186185
if ! $SOME_PIPELINE_FAILED ; then
187186
echo "List of failed PLRs:"
188187
fi
189-
echo "https://console.redhat.com/application-pipeline/workspaces/${KONFLUX_NAMESPACE}/applications/${KONFLUX_APPLICATION_NAME}/pipelineruns/${PIPELINE_RUN}"
188+
echo "https://console.redhat.com/application-pipeline/workspaces/${KONFLUX_TENANT}/applications/${KONFLUX_APPLICATION_NAME}/pipelineruns/${PIPELINE_RUN}"
190189
SOME_PIPELINE_FAILED=true
191190
fi
192191
done

0 commit comments

Comments
 (0)