Skip to content

Commit 306c4b1

Browse files
cailloucJohnVillalovos
authored andcommitted
feat(api): pipeline inputs support (#3194)
1 parent 8bae3b5 commit 306c4b1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

gitlab/v4/objects/projects.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ def trigger_pipeline(
429429
ref: str,
430430
token: str,
431431
variables: dict[str, Any] | None = None,
432+
inputs: dict[str, Any] | None = None,
432433
**kwargs: Any,
433434
) -> ProjectPipeline:
434435
"""Trigger a CI build.
@@ -439,15 +440,22 @@ def trigger_pipeline(
439440
ref: Commit to build; can be a branch name or a tag
440441
token: The trigger token
441442
variables: Variables passed to the build script
443+
inputs: Inputs passed to the build script
442444
**kwargs: Extra options to send to the server (e.g. sudo)
443445
444446
Raises:
445447
GitlabAuthenticationError: If authentication is not correct
446448
GitlabCreateError: If the server failed to perform the request
447449
"""
448450
variables = variables or {}
451+
inputs = inputs or {}
449452
path = f"/projects/{self.encoded_id}/trigger/pipeline"
450-
post_data = {"ref": ref, "token": token, "variables": variables}
453+
post_data = {
454+
"ref": ref,
455+
"token": token,
456+
"variables": variables,
457+
"inputs": inputs,
458+
}
451459
attrs = self.manager.gitlab.http_post(path, post_data=post_data, **kwargs)
452460
if TYPE_CHECKING:
453461
assert isinstance(attrs, dict)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy