-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathstep.yml
240 lines (204 loc) · 8.63 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
---
title: Microsoft Teams Integration
summary: Allows you to receive build status updates on Microsoft Team using Incoming Webhooks
description: |
Uses Incoming Webhooks feature in Microsft Teams to send updates on your builds
website: https://github.com/amrfarid140/bitrise-step-microsoft-teams-integration
source_code_url: https://github.com/amrfarid140/bitrise-step-microsoft-teams-integration
support_url: https://github.com/amrfarid140/bitrise-step-microsoft-teams-integration/issues
host_os_tags:
- osx-10.10
- ubuntu-16.04
type_tags:
- notification
is_requires_admin_user: true
is_always_run: true
is_skippable: true
toolkit:
go:
package_name: github.com/amrfarid140/bitrise-step-microsoft-teams-integration
inputs:
- card_title: $BITRISE_APP_TITLE
opts:
title: "Card Title"
summary: "The heading text at the top of the MessageCard"
description: |
Primary MessageCard title text.
If no value is given, the default value will be the `BITRISE_APP_TITLE`.
- enable_debug: "no"
opts:
title: "Enable debug logging"
summary: "Toggles whether to log debug info to the build output"
description: |
Enables debug logging to the Bitrise console.
WARNING: This will output the JSON value of the Teams Webhook body, be mindful of what is output here.
value_options:
- "yes"
- "no"
- success_theme_color: 359914
opts:
category: "Theme Customisation"
title: "Theme Color - Build Success"
summary: "Sets the cards theme color to the given hex value for successful builds"
description: |
Given value should be a hexadecimal color, minus the leading `#`.
Defaults to `359914` if not overridden.
- failed_theme_color: E04504
opts:
category: "Theme Customisation"
title: "Theme Color - Build Failed"
summary: "Sets the cards theme color to the given hex value for failed builds"
description: |
Given value should be a hexadecimal color, minus the leading `#`.
Defaults to `E04504` if not overridden.
- enable_primary_section_markdown: "yes"
opts:
category: "Markdown Rules"
title: "Primary Section Markdown"
summary: "Sets whether the text fields within the MessageCard's first section should render Markdown text"
description: |
Sets whether to enable Markdown rendering for the each field of the first section of the MessageCard.
User input fields affected:
* section_title
* section_subtitle
* section_text
value_options:
- "yes"
- "no"
- enable_build_status_facts_markdown: "no"
opts:
category: "Markdown Rules"
title: "Build Status Facts Markdown"
summary: "Sets whether each of the facts should render their values as Markdown text"
description: |
Sets whether to enable Markdown rendering for the default Facts within the MessageCard.
Fact fields affected:
* Build Status
* Build Number
* Git Branch
* Build Triggered
* Workflow
value_options:
- "yes"
- "no"
- section_title: $GIT_CLONE_COMMIT_AUTHOR_NAME
opts:
category: "MessageCard Content"
title: "Section Title"
summary: "Text that is displayed within the MessageCard Section `activityTitle`"
description: |
Sets the text value of `activityTitle` within the primary Section of the MessageCard.
By default, this will be set to the commit authors' name that triggered the build.
- section_subtitle: $GIT_CLONE_COMMIT_MESSAGE_SUBJECT
opts:
category: "MessageCard Content"
title: "Section Subtitle"
summary: "Text that is displayed within the MessageCard Section `activitySubtitle`"
description: |
Sets the text value of `activitySubtitle` within the primary Section of the MessageCard.
By default, this will be set to the commit message subject that triggered the build.
- section_text: $GIT_CLONE_COMMIT_MESSAGE_BODY
opts:
category: "MessageCard Content"
title: "Section Text"
summary: "Text that is displayed within the MessageCard Section `text`"
description: |
Sets the text value of `text` within the primary Section of the MessageCard. By default,
this will be set to the commit message body that triggered the build.
If desired, this is the perfect place to include release notes via the `generate-changelog` Bitrise step, however
setting `enable_primary_section_markdown` to `yes` may be necessary to properly format the changelog content.
- section_header_image:
opts:
category: "MessageCard Content"
title: "Section Image"
summary: "Image that is displayed within the MessageCard Section `activityImage`"
- section_image:
opts:
category: "MessageCard Image"
title: "Image"
summary: "Image that is displayed within the MessageCard Section `images`"
- section_image_description:
opts:
category: "MessageCard Image"
title: "Image Description"
summary: "A short description of the image. Typically, description is displayed in a tooltip as the user hovers their mouse over the image."
- enable_default_actions: "yes"
opts:
category: "MessageCard Actions"
title: "Default MessageCard Actions"
summary: "Toggles the default actions within the MessageCard."
description: |
Allows for disabling the default 'Go To Repo' and 'Go To Build' MessageCard Actions if you wish to provide only your own custom actions
via the `actions` step input (up to a limit of 4 actions in total).
value_options:
- "yes"
- "no"
- actions: "[]"
opts:
category: "MessageCard Actions"
title: "MessageCard Actions"
summary: "Additional extra custom actions to display on the MessageCard"
description: |
A stringified JSON object array of additional custom actions to display on the card.
The maximum amount of actions a single card can display is 4, 2 of which are used if
`enable_default_actions` is set to `yes`.
Each action button object must have a `text` key/value pair, and a list of `target` objects
which define the `uri`, specific to which platform-client (`os` value) the Teams message is viewed on.
Valid `os` values are (case-sensitive):
* iOS
* android
* windows
* default (shows action button on every Teams client, regardless of platform)
NOTE: Step input must be valid JSON. Trailing commas are not permitted.
Example input:
```json
[
{
"text": "Open deep link",
"targets": [
{
"uri": "your_universal_link",
"os": "iOS"
},
{
"uri": "your_android_app_link",
"os": "android"
},
{
"uri": "https://www.google.com",
"os": "default"
}
]
}
]
```
While this isn't the most user-friendly way to define custom buttons, Bitrise step
parsing is currently limited to string value inputs and does not allow defining a YAML object list, which
has been [feature requested here](https://github.com/bitrise-io/go-steputils/issues/23).
- repository_url: $GIT_REPOSITORY_URL
opts:
title: "Repository URL"
summary: "Define a custom repository location"
description: |
If no value is given, the step automatically uses the `$GIT_REPOSITORY_URL` var.
If a Bitrise project is configured via SSH, `$GIT_REPOSITORY_URL` is not a useable
URI Target for the MessageCard, so this allows for overriding this value if SSH is configured.
- webhook_url:
opts:
title: "Incoming Webhook URL"
summary: "Url of the Incoming Webhook generated by Microsoft Teams"
description: |
* Go to Microsoft Teams
* Click on the three dots next to channel name then **Add Connector**
* Select **Incoming Webhook* and in the text input type **Bitrise**
* Save and copy the link to the input for this step
is_required: true
- timezone: UTC
opts:
category: "MessageCard Content"
title: "Timezone"
summary: "Sets the timezone to use for the 'Build triggered' time"
description: |
Sets the timezone to use for the 'Build triggered' time in the MessageCard.
Defaults to UTC if no value is given.
Valid timezone name inputs can be [found here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).