Skip to content

Commit d5cf0b8

Browse files
authored
[ISV-1344] As a partner, the hosted pipeline won't re-test my operator if only project settings are changed (#164)
* [ISV-1344] Preflight tests are only skipped if the result aren't passed. * Add log for the preflight results * Enclose the log into else condition Co-authored-by: haripate <>
1 parent fe0ce90 commit d5cf0b8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ansible/roles/operator-pipeline/templates/openshift/tasks/get-ci-results-attempt.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
cat test_result_id | tee $(results.test_result_id.path)
6262
6363
- name: indicate-if-results-exists
64-
image: registry.access.redhat.com/ubi8-minimal@sha256:54ef2173bba7384dc7609e8affbae1c36f8a3ec137cacc0866116d65dd4b9afe
64+
image: "$(params.pipeline_image)"
6565
workingDir: $(workspaces.results.path)
6666
env:
6767
- name: RESULTS_FILE
@@ -71,7 +71,13 @@ spec:
7171
7272
if [ -f $RESULTS_FILE ]; then
7373
echo "Results exist"
74-
echo -n "true" | tee $(results.preflight_results_exists.path)
74+
CHECK_RESULTS=$(cat $RESULTS_FILE | jq -r '.passed')
75+
if [ $CHECK_RESULTS = "false" ]; then
76+
echo "Not all preflight tests passed."
77+
else
78+
echo "All preflight tests passed successfully."
79+
fi
80+
echo -n "$CHECK_RESULTS" | tee $(results.preflight_results_exists.path)
7581
echo -n "$RESULTS_FILE" | tee $(results.preflight_results.path)
7682
else
7783
echo "Results do not exist"

0 commit comments

Comments
 (0)