deploy
Trigger Jenkins jobs by translating user-friendly arguments into the job's real parameters, handling branch, tickets, dependencies, secrets, and returning build number and URL.
Instructions
High-level deploy. Maps friendly args to the job's actual Jenkins parameters.
Args:
job: Deploy target (fuzzy). A bare environment defaults to the configured app job:
'dev' / 'deploy dev' → 'dev_app_deployment'; say 'dev backend' for the
backend job. Other job names resolve by fuzzy match.
branch: Git branch to deploy. Sets whichever branch parameter the job defines (see config).
tickets: Ticket URL(s) for the deployment purpose. Multiple URLs may be passed
comma-separated ('url1, url2'); they are normalized to a comma-joined list.
install_dependencies: If True, sets INSTALL_BE_REQUIREMENTS + INSTALL_FE_PACKAGES (whichever exist).
use_server_secrets: Sets USE_SECRETS_FROM_SERVER.
config_branch: Sets CONFIGURATION_MANAGEMENT_BRANCH. Default is already 'main' on most jobs.
use_dummy_purpose: When the job mandates a deployment purpose and the user has no
ticket URL, set this True to deploy with the placeholder purpose
(<configured dummy_purpose>). Leave False to be told the purpose is required.
allow_mr_purpose: Set True to accept a merge-request URL as the purpose after the
user confirms (see the 'mr_url_as_purpose' guard below).
extra: Raw Jenkins param overrides {name: value}. Used for anything the friendly API misses.
wait: Poll the queue until a build number is assigned.
timeout: Max seconds to wait for the queue→build transition.
Mandatory deployment purpose: if the resolved job enforces a non-empty purpose
(DEPLOYMENT_PURPOSE) and no tickets was given, this returns
{"error": "deployment_purpose_required", ...} WITHOUT deploying. When you get
that, ask the user whether to (a) paste a ticket/URL — then re-call with tickets=...
— or (b) proceed with a dummy URL — then re-call with use_dummy_purpose=True.
Merge-request URL guard: the purpose should be ticket URL(s). If any supplied URL is a
merge request (/merge_requests/<id>) this returns {"error": "mr_url_as_purpose", ...}
WITHOUT deploying. Tell the user the URL is an MR, not a ticket, and ask them to either
paste the correct ticket URL or re-call with allow_mr_purpose=True to proceed anyway.
Returns the trigger result with build_number, build_url, and parameters_sent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | Yes | ||
| wait | No | ||
| extra | No | ||
| branch | No | ||
| tickets | No | ||
| timeout | No | ||
| config_branch | No | ||
| allow_mr_purpose | No | ||
| use_dummy_purpose | No | ||
| use_server_secrets | No | ||
| install_dependencies | No |