deploy-notify-slack 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +7 -7
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Mike
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Dummy script to send notification about new version deployment to a Slack channel
|
|
2
2
|
|
|
3
|
-
- no npm dependencies, plain nodejs
|
|
3
|
+
- no npm dependencies, plain nodejs 8.x or higher
|
|
4
4
|
- use Slack incoming webhooks API to send a message
|
|
5
5
|
- can attach version description Markdown files
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
> you can also create cross-environment file with name pattern `v${VERSION}.md` and if script cannot find stage specific description it will get this one.
|
|
23
23
|
>
|
|
24
|
-
> If no
|
|
24
|
+
> If no description file found details block will be omitted in Slack message.
|
|
25
25
|
|
|
26
26
|
- FAILS_IF_NOT_SENT - (false by default) Should exit with not 0 error code if message was not sent successfully.
|
|
27
27
|
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
|
|
32
32
|
- In Bitbucket pipeline or another place you wish to notify about just deployed version of your application you can add dev dependency
|
|
33
33
|
```shell
|
|
34
|
-
npm i --no-save deploy-notify-slack@^0.
|
|
34
|
+
npm i --no-save deploy-notify-slack@^0.3
|
|
35
35
|
```
|
|
36
36
|
or major version
|
|
37
37
|
```shell
|
|
38
|
-
npm i --location=global deploy-notify-slack@^0.
|
|
38
|
+
npm i --location=global deploy-notify-slack@^0.3
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
- run the scrypt with your env variables:
|
|
@@ -49,7 +49,7 @@ Bitbucket pipeline example:
|
|
|
49
49
|
name: Notify deploy
|
|
50
50
|
image: node:16-alpine
|
|
51
51
|
script:
|
|
52
|
-
- npm i --location=global deploy-notify-slack@^0.
|
|
52
|
+
- npm i --location=global deploy-notify-slack@^0.3
|
|
53
53
|
- VERSION=$(npm run version --silent)
|
|
54
54
|
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL} STAGE=dev VERSION=$VERSION node ./node_modules/deploy-notify-slack/notify
|
|
55
55
|
```
|
|
@@ -61,7 +61,7 @@ or install package globally
|
|
|
61
61
|
name: Notify Slack
|
|
62
62
|
image: node:16-alpine
|
|
63
63
|
script:
|
|
64
|
-
- npm i --location=global deploy-notify-slack@^0.
|
|
64
|
+
- npm i --location=global deploy-notify-slack@^0.3
|
|
65
65
|
- VERSION=$(npm run version --silent)
|
|
66
66
|
- PWD=$(pwd)
|
|
67
67
|
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL} STAGE=dev VERSION=$VERSION CHANGELOG_PATH=$PWD/changelog node /usr/local/lib/node_modules/deploy-notify-slack/notify.js
|
|
@@ -110,7 +110,7 @@ pipelines:
|
|
|
110
110
|
name: Notify Slack
|
|
111
111
|
image: node:16-alpine
|
|
112
112
|
script:
|
|
113
|
-
- npm i --location=global deploy-notify-slack@^0.
|
|
113
|
+
- npm i --location=global deploy-notify-slack@^0.3
|
|
114
114
|
- VERSION=$(npm run version --silent)
|
|
115
115
|
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL} STAGE=dev VERSION=$VERSION node /usr/local/lib/node_modules/deploy-notify-slack/notify.js
|
|
116
116
|
|