File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
lib/fastlane/plugin/wpmreleasetoolkit/actions/common Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,17 @@ def self.run(params)
11
11
}
12
12
13
13
client = Buildkit . new ( token : params [ :buildkite_token ] )
14
+ options = {
15
+ branch : params [ :branch ] ,
16
+ commit : params [ :commit ] ,
17
+ env : params [ :environment ] . merge ( pipeline_name ) ,
18
+ message : params [ :message ]
19
+ } . compact # remove entries with `nil` values from the Hash, if any
20
+
14
21
response = client . create_build (
15
22
params [ :buildkite_organization ] ,
16
23
params [ :buildkite_pipeline ] ,
17
- {
18
- branch : params [ :branch ] ,
19
- commit : params [ :commit ] ,
20
- env : params [ :environment ] . merge ( pipeline_name )
21
- }
24
+ options
22
25
)
23
26
24
27
response . state == 'scheduled' ? UI . message ( 'Done!' ) : UI . crash! ( "Failed to start job\n Error: [#{ response } ]" )
@@ -64,6 +67,13 @@ def self.available_options
64
67
type : String ,
65
68
default_value : 'HEAD'
66
69
) ,
70
+ FastlaneCore ::ConfigItem . new (
71
+ key : :message ,
72
+ description : 'A custom message to show for the build in Buildkite\'s UI' ,
73
+ type : String ,
74
+ optional : true ,
75
+ default_value : nil
76
+ ) ,
67
77
FastlaneCore ::ConfigItem . new (
68
78
key : :pipeline_file ,
69
79
description : 'The name of the pipeline file in the project' ,
You can’t perform that action at this time.
0 commit comments