File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -429,6 +429,7 @@ def trigger_pipeline(
429
429
ref : str ,
430
430
token : str ,
431
431
variables : dict [str , Any ] | None = None ,
432
+ inputs : dict [str , Any ] | None = None ,
432
433
** kwargs : Any ,
433
434
) -> ProjectPipeline :
434
435
"""Trigger a CI build.
@@ -439,15 +440,22 @@ def trigger_pipeline(
439
440
ref: Commit to build; can be a branch name or a tag
440
441
token: The trigger token
441
442
variables: Variables passed to the build script
443
+ inputs: Inputs passed to the build script
442
444
**kwargs: Extra options to send to the server (e.g. sudo)
443
445
444
446
Raises:
445
447
GitlabAuthenticationError: If authentication is not correct
446
448
GitlabCreateError: If the server failed to perform the request
447
449
"""
448
450
variables = variables or {}
451
+ inputs = inputs or {}
449
452
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
+ }
451
459
attrs = self .manager .gitlab .http_post (path , post_data = post_data , ** kwargs )
452
460
if TYPE_CHECKING :
453
461
assert isinstance (attrs , dict )
You can’t perform that action at this time.
0 commit comments