Skip to main content
Configure these examples in External pipeline actions. Add API_TOKEN and APP_SLUG secrets. Paste the appropriate script into both editors: context.action chooses the operation. Keep Bitrise’s Git status reporting enabled so GitLab receives the eventual build outcome.

Pipeline runs

Bitrise provides pipeline abort and pipeline rebuild. The example rebuilds with partial: false, validates the original SHA, and groups statuses referring to one run. It accepts the Bitrise app pipeline target URL or looks up a unique matching run. Run IDs are distinct from pipeline definition IDs.

Standalone builds

Use the build trigger and abort API. A retry creates a new build from the original SHA and workflow, retaining original MR and fork parameters and filling missing MR information from GitLab context. The original build remains in history. Check the trigger response’s results array rather than deprecated top-level build fields.
Both lookup examples inspect the latest 100 runs and fail when no unique match exists. Extend provider pagination when a run is older, or ensure each GitLab status links to its exact run. Verify which target URL format your workflows report before enabling automatic retries. Provider permissions, precondition failures, and rate limits can reject an action. Scripts check HTTP failures and preserve Git status reporting. The implementation tests use mocked HTTP responses; they do not start real Bitrise builds.