Skip to content

Commit 6be95b0

Browse files
author
Rafael Nobre
committed
Add support for Environment Variables in Slack commands.
1 parent 99d35c6 commit 6be95b0

File tree

5 files changed

+321
-211
lines changed

5 files changed

+321
-211
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ Other, optional parameters:
151151
**NOTE**: at least either `branch` or `workflow` have to be specified, and of course
152152
you can specify both if you want to. You're free to specify any number of optional parameters.
153153

154-
An example with all parameters included: `workflow: primary|b: master|tag: v1.0|commit:eee55509f16e7715bdb43308bb55e8736da4e21e|m: start my build!`
154+
You can also send environment variables that will be available in your workflow with the format: `env[KEY1]:value1|ENV[KEY2]:value2`
155+
156+
An example with all parameters included: `workflow: primary|b: master|tag: v1.0|commit:eee55509f16e7715bdb43308bb55e8736da4e21e|m: start my build!|ENV[DEVICE_NAME]:iPhone 6S|ENV[DEVICE_UDID]:82667b4079914d4aabed9c216620da5dedab630a`
155157

156158

157159
## How to compile & run the server

bitriseapi/bitriseapi.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@ import (
1212
"time"
1313
)
1414

15+
// EnvironmentItem ...
16+
type EnvironmentItem struct {
17+
Name string `json:"mapped_to,omitempty"`
18+
Value string `json:"value,omitempty"`
19+
IsExpand bool `json:"is_expand,omitempty"`
20+
}
21+
1522
// BuildParamsModel ...
1623
type BuildParamsModel struct {
17-
CommitHash string `json:"commit_hash,omitempty"`
18-
CommitMessage string `json:"commit_message,omitempty"`
19-
Branch string `json:"branch,omitempty"`
20-
Tag string `json:"tag,omitempty"`
21-
PullRequestID *int `json:"pull_request_id,omitempty"`
22-
WorkflowID string `json:"workflow_id,omitempty"`
24+
CommitHash string `json:"commit_hash,omitempty"`
25+
CommitMessage string `json:"commit_message,omitempty"`
26+
Branch string `json:"branch,omitempty"`
27+
Tag string `json:"tag,omitempty"`
28+
PullRequestID *int `json:"pull_request_id,omitempty"`
29+
WorkflowID string `json:"workflow_id,omitempty"`
30+
Environments []EnvironmentItem `json:"environments,omitempty"`
2331
}
2432

2533
// TriggerAPIParamsModel ...

0 commit comments

Comments
 (0)