forked from bitrise-steplib/steps-slack-message
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitrise.yml
137 lines (130 loc) · 3.96 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
129
130
131
132
133
134
135
136
137
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:
- webhook_url: $SLACK_WEBHOOK_URL
- 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:
- webhook_url: $SLACK_WEBHOOK_URL
- 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="Multi\nline\n\ntext"
envman add --key SLACK_MESSAGE_FROM_SCRIPT --value "$multi_line_msg"
- path::./:
title: Should escape backslash+n as newline char
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- channel: $SLACK_CHANNEL
- from_username: step-dev-test
- message: $SLACK_MESSAGE_FROM_SCRIPT
fail-message-test:
steps:
- script:
title: Fail
inputs:
- content: exit 1
- path::./:
title: On Error
is_skippable: false
inputs:
- webhook_url: $SLACK_WEBHOOK_URL
- 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
- channel: no-channel-like-this
missing-webhook-url-test:
steps:
- path::./:
is_skippable: false
# ----------------------------------------------------------------
# --- Utility workflows
dep-update:
title: Dep update
description: |
Used for updating bitrise dependencies with dep
steps:
- script:
title: Dependency update
inputs:
- content: |-
#!/bin/bash
set -ex
go get -u -v github.com/golang/dep/cmd/dep
dep ensure -v
dep ensure -v -update
# ----------------------------------------------------------------
# --- 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