Revert "CI: Try without the mark-task-as-failed task???"

This reverts commit ebb9bd0a96.

Turns out it is actually needed, yep.
This commit is contained in:
DeeDeeG 2023-09-10 02:33:13 -04:00
parent ebb9bd0a96
commit a188dd373c

View File

@ -10,3 +10,25 @@ linux_task:
- echo "CIRRUS_TAG is: xyz--${CIRRUS_TAG}--xyz"
- echo "CIRRUS_CHANGE_IN_REPO is: xyz--${CIRRUS_CHANGE_IN_REPO}--xyz"
- echo "CIRRUS_LAST_GREEN_CHANGE is: xyz--${CIRRUS_LAST_GREEN_CHANGE}--xyz"
silently_mark_skipped_or_no_scheduled_task_builds_as_failed_task:
skip_notifications: true
# "skip_notifications: true" makes GitHub see the build as successful, for cleaner statuses on GitHub.
only_if: $CIRRUS_CRON == "" && $CIRRUS_TAG == ""
# Only mark the "skipped" or "no-tasks-cheduled" builds as failed. "Cron" builds and "tag push" builds should be allowed to succeed.
# !!! Don't forget to update the "only_if:" for this task to match, if you update the "only_if:" logic in the other tasks. !!!
container:
image: alpine:latest
# A light and minimal image, to save Cirrus some resources, why not?
cpu: 1
# Set CPU cores used by the VM to 1. Otherwise, we burn double the CPU-seconds per IRL second, due to 2 CPU cores being provisioned by default.
clone_script: |
true
# Fake "clone repo" script that overrides the default, actual clone script.
# Actually cloning the repo isn't necessary for this task. But if cloning fails, it triggers an automatic re-run.
# So, we have to provide this fake clone script to override the real one, if we want to save any IRL time versus an actual clone.
# Saves ~2 CPU-seconds vs a real, clone_depth 1 clone. Saves ~2 minutes IRL time vs a clone script that deliberately fails or times out.
mark_task_as_failed_script: |
false # This script does nothing but mark the build as failed, protecting the CIRRUS_LAST_GREEN_CHANGE from being updated when it shouldn't be.
timeout_in: 6s
# Avoid wasting any more than 6 seconds, or up to 12 seconds if an automatic re-run is triggered. 2 seconds is typical for the whole task, though.