Description¶
Starts a custom pipeline of the current Bitbucket repository, on the current branch, through the Bitbucket REST API. Used by 33_trigger_parse_manuscript.sh.
Usage¶
python3 tools/bitbucket_trigger_pipeline.py <pipeline> [--var NAME=VALUE ...]<pipeline>- Name of the custom pipeline, for examplem-parse-manuscript.--var NAME=VALUE- A pipeline variable (repeatable). Variables with an empty value are not sent.
Prints the URL of the new run. Exit code 0 if it was started, 1 if not, with the reason on stderr.
Environment Variables¶
BITBUCKET_WORKSPACE,BITBUCKET_REPO_SLUG,BITBUCKET_BRANCH- Set by Bitbucket Pipelines; the tool does not run elsewhere.JIRA_USERNAME- The Atlassian account email used for the API login.P_BITBUCKET_PAT- A Bitbucket API token with the scopewrite:pipeline:bitbucket.