CLI command

probierz schedule add

Add a schedule that runs a product's journeys, authors what coverage lacks, or keeps and pages the report.

Invocation#

Shell
probierz schedule add <NAME> --host <HOST> --cron <CRON> [--app <APP>] [--trigger cadence|main|gaps|store|deploy] [--journey <JOURNEY>] [--target <TARGET>] [--link <APP STORE LINK>] [--report] [--secret-env <NAME=REFERENCE>...]

Required inputs and options#

  • <NAME> is lower-case letters, digits and dashes; --host is the registry host it fires on, stado:<target> from probierz hosts; --cron five fields in UTC.
  • --trigger cadence (the default) fires probierz remote run <target> --app <app> --host <host> --spec <spec> for --journey, or probierz matrix <app> nightly without one; main fires probierz schedule tick for --app or, without it, for every product whose manifest the workspace holds when it fires; gaps fires probierz schedule fill for --app or for every product; store fires probierz schedule release for --app and the App Store page --link names; deploy is refused until Stado publishes deployment events.
  • --report fires probierz report [<app>] --save --send instead of journeys. --secret-env NAME=REFERENCE is a secret Stado materializes in the fired job.

Output and state effects#

Creates the Stado schedule, pinned to that host and its provider, and prints Stado's record. Each firing first installs, through Stado, the release of the exact commit that created the schedule, and runs that Probierz. The id is derived from the name, so adding it twice is refused rather than duplicated.

Exact refusals#

  • exists (exit 1): a name Stado already holds is refused naming the standing schedule by the id Stado gave it and probierz schedule edit|remove; what Stado holds is unchanged. Real test: tests/schedule/stado.rs.
  • A host that is not stado:<target> (local, a bare or constrained stado) is refused: a schedule fires on one registry host. A target whose kind Stado's registry answers empty is refused as unavailable (exit 69): Stado's registry refuses every target without a kind, so the answer is Stado's fault; nothing is created.
  • A flag the schedule would fire without is refused, not dropped: --journey with a trigger other than cadence, --trigger other than cadence with --report, --link with a trigger other than store; --target needs --journey, and --journey or --target with --report is a usage error.
  • A Probierz built from a modified tree is refused: a schedule installs the release of the exact commit that created it.
  • A cadence, store or imports schedule without --app is refused (app-required, exit 2): only --report, --trigger main and --trigger gaps cover every product.
  • A store schedule is refused before Stado is asked when it names no --link (link-required, exit 2), a Google Play link, whose versions Google does not publish (release-unreadable, exit 2), a link that is no store link (link-invalid), or a product with no journeys on a mobile:ios surface (surface-missing, exit 1). Real test: tests/schedule/release.rs.
  • A journey no surface of the manifest serves is refused naming what each surface serves.
  • --trigger deploy is refused until Stado publishes deployment events; Stado's own refusal (an invalid cron, an unknown host) is stado-refused, printed whole.
  • A schedule list Stado answers without JSON, not as a list, or with a Probierz schedule that has no id, is refused as unavailable (exit 69) with its answer instead of being read as no schedules.

Source snapshot#

Generated from the Rust binaries at revision 99a74945a3598a8d73b6c6cbe5aae4f283becea3 of Probierz's private source repository.

Combined help SHA-256: 77529678a61237f774b59e76df0d1907cb749ef5da56d2ed913b040793b7d30b; binary SHA-256: be9e0eaff0e6ea50403a0c6f6d467697a4eac676f9523b8dc13a596d2b5526c5.