Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/pj-rehearse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ func validateOptions(o options) error {
}

const (
misconfigurationOutput = `[ERROR] pj-rehearse: misconfiguration
misconfigurationOutput = `ERROR: pj-rehearse: misconfiguration

pj-rehearse could not process its necessary inputs properly. No rehearsal
jobs were run. This is likely a pj-rehearse job configuration problem.`
rehearseFailureOutput = `[ERROR] pj-rehearse: rehearsal tool failure
rehearseFailureOutput = `ERROR: pj-rehearse: rehearsal tool failure

pj-rehearse attempted to submit jobs for rehearsal, but it failed to either
submit them or to fetch their results. This is either a pj-rehearse bug or
an infrastructure issue.`
jobsFailureOutput = `[ERROR] pj-rehearse: rehearsed jobs failure
jobsFailureOutput = `ERROR: pj-rehearse: rehearsed jobs failure

pj-rehearse rehearsed jobs and at least one of them failed. This means that
job would fail when executed against the current HEAD of the target branch.`
failedSetupOutput = `[ERROR] pj-rehearse: setup failure
failedSetupOutput = `ERROR: pj-rehearse: setup failure

pj-rehearse failed to finish all setup necessary to perform job rehearsals.
This is either a pj-rehearse bug or an infrastructure failure.`
Expand Down
6 changes: 3 additions & 3 deletions test/pj-rehearse-integration/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ make_testing_repository
readonly REHEARSED_JOBS="${WORKDIR}/rehearsals.yaml"
echo "[INFO] Running pj-rehearse in dry-mode..."
if ! pj-rehearse --dry-run=true --no-fail=false --allow-volumes=true --candidate-path "${FAKE_OPENSHIFT_RELEASE}" > "${REHEARSED_JOBS}" 2> "${WORKDIR}/pj-rehearse-stderr.log"; then
echo "[ERROR] pj-rehearse failed:"
echo "ERROR: pj-rehearse failed:"
cat "${WORKDIR}/pj-rehearse-stderr.log"
exit 1
fi

echo "[INFO] Validating created rehearsals"
if ! output="$(compare_to_expected "${REHEARSED_JOBS}")"; then
cat "${WORKDIR}/pj-rehearse-stderr.log"
output="$( printf -- "${output}" | sed 's/^/[ERROR] /' )"
printf "[ERROR] pj-rehearse output differs from expected:\n\n$output\n"
output="$( printf -- "${output}" | sed 's/^/ERROR: /' )"
printf "ERROR: pj-rehearse output differs from expected:\n\n$output\n"
exit 1
fi

Expand Down
8 changes: 4 additions & 4 deletions test/prowgen-integration/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ci-operator-prowgen --from-dir "${input_config_dir}" --to-dir "${generated_outpu
echo "[INFO] Validating generated Prow jobs..."
if ! diff -Naupr "${expected_output_jobs_dir}" "${generated_output_jobs_dir}"> "${workdir}/diff"; then
cat << EOF
[ERROR] Incorrect Prow jobs were generated!
[ERROR] The following errors were found:
ERROR: Incorrect Prow jobs were generated!
ERROR: The following errors were found:

EOF
cat "${workdir}/diff"
Expand All @@ -43,8 +43,8 @@ determinize-prow-jobs --prow-jobs-dir "${determinized_output_jobs_dir}"
echo "[INFO] Validating determinized Prow jobs..."
if ! diff -Naupr "${determinized_output_jobs_dir}" "${generated_output_jobs_dir}"> "${workdir}/diff"; then
cat << EOF
[ERROR] Prow job generator did not output determinized jobs!
[ERROR] The following errors were found:
ERROR: Prow job generator did not output determinized jobs!
ERROR: The following errors were found:

EOF
cat "${workdir}/diff"
Expand Down
8 changes: 4 additions & 4 deletions test/validate-prowgen-breaking-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ ci-operator-prowgen --from-dir "${workdir}/release/ci-operator/config" --to-dir
pushd "${workdir}/release"

if [ -n "$(git status --porcelain)" ]; then
echo "[ERROR] Changes in openshift/release:"
echo "ERROR: Changes in openshift/release:"
git diff
echo "[ERROR] Running Prowgen in openshift/release results in changes ^^^"
echo "[ERROR] To avoid breaking openshift/release for everyone you should regenerate"
echo "[ERROR] the jobs there and merge the changes ASAP after this change to Prowgen"
echo "ERROR: Running Prowgen in openshift/release results in changes ^^^"
echo "ERROR: To avoid breaking openshift/release for everyone you should regenerate"
echo "ERROR: the jobs there and merge the changes ASAP after this change to Prowgen"
popd
exit 1
else
Expand Down