-
Notifications
You must be signed in to change notification settings - Fork 34
/
bitrise.yml
128 lines (122 loc) · 3.92 KB
/
bitrise.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
format_version: 5
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_STEP_GIT_CLONE_URL: https://github.com/bitrise-io/steps-slack-message.git
workflows:
test:
before_run:
- audit-this-step
steps:
- go-list:
- golint:
- errcheck:
- go-test:
- path::./:
title: On Success
is_skippable: false
inputs:
- api_token: $SLACK_API_TOKEN
- channel: $SLACK_CHANNEL
- from_username: step-dev-test
- link_names: "yes"
- message: |
First, On Success test
Multiline, with a link: https://www.bitrise.io ,
_some_ *highlight*,
and linkify @slackbot #random
- color: good
- path::./:
title: On Success - without channel
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- channel: ""
- from_username: step-dev-test
- message: On Success test - without channel param
- color: warning
- path::./:
title: On Success
description: Overwrite the emoji parameter with an Icon URL input.
is_skippable: false
inputs:
- api_token: $SLACK_API_TOKEN
- channel: $SLACK_CHANNEL
- from_username: step-dev-test-2
- message: The Icon URL should be used instead of the Emoji input!
- emoji: ':white_check_mark:'
- icon_url: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-icon-128.png
- is_debug_mode: "yes"
- color: '#00ff00'
- path::./:
title: On Success - with an image / gif
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- channel: $SLACK_CHANNEL
- from_username: step-dev-test
- message: |
On Success test - with an image
Multiline, with a link: https://www.bitrise.io ,
and _some_ *highlight*
- color: good
- image_url: https://media.giphy.com/media/6brH8dM3zeMyA/giphy.gif
title: Generate SLACK_MESSAGE_FROM_SCRIPT
inputs:
- content: |-
#!/bin/bash
set -ex
multi_line_msg="Multiline, with a link: https://www.bitrise.io, \n _some_ *highlight*, \n and linkify @slackbot #random"
envman add --key SLACK_MESSAGE_FROM_SCRIPT --value "$multi_line_msg"
- path::./:
title: Should escape backslash+n as newline char + custom multiline release notes field
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- api_token: $SLACK_API_TOKEN
- channel: $SLACK_CHANNEL
- from_username: step-dev-test
- message: $SLACK_MESSAGE_FROM_SCRIPT
- fields: |
Release notes|${SLACK_MESSAGE_FROM_SCRIPT}
App|${BITRISE_APP_TITLE}
Branch|${BITRISE_GIT_BRANCH}
Workflow|${BITRISE_TRIGGERED_WORKFLOW_ID}
fail-message-test:
steps:
- script:
title: Fail
inputs:
- content: exit 1
- path::./:
title: On Error
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- api_token: $SLACK_API_TOKEN
- channel: $SLACK_CHANNEL
- from_username_on_error: step-dev-test-ON-ERROR
- message: On Error TEST
invalid-channel-test:
steps:
- path::./:
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- api_token: $SLACK_API_TOKEN
- channel: no-channel-like-this
missing-webhook-url-test:
steps:
- path::./:
is_skippable: false
# ----------------------------------------------------------------
# --- workflows to Share this step into a Step Library
audit-this-step:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml