You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/blog/2025-01-09-how-adminforth-manages-version/index.md
+64-6Lines changed: 64 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,9 +113,9 @@ npm i -D semantic-release
113
113
114
114
We will use Woodpecker CI for this example. Woodpecker is a free and open-source CI/CD tool that you can install to your own server / VPS and will not need to pay only for server. No limits on pipelines, users, repositories, etc. If you want to try it, we have [Woodpecker installation guide](https://devforth.io/blog/step-by-step-guide-to-modern-secure-ci-setup/)
115
115
116
-
Create a file `.woodpecker.yml` in root of your repository:
116
+
Create a file `.woodpecker.yml` in `deploy` directory:
117
117
118
-
```
118
+
```yaml title="deploy/.woodpecker.yml"
119
119
clone:
120
120
git:
121
121
image: woodpeckerci/plugin-git
@@ -257,7 +257,7 @@ git push
257
257
This will trigger release `v1.2.0` because we merged `next` to `main` and it was a feature release.
258
258
259
259
260
-
## Slack notifications
260
+
## Slack notifications about releases
261
261
262
262
So now we have automatic releases with release notes on GitHub.
263
263
For our internal team we use Slack and we want to get notifications about releases there.
@@ -294,8 +294,11 @@ Into "release" section of `package.json` add slack plugin:
294
294
},
295
295
//diff-add
296
296
"markdownReleaseNotes": true
297
+
//diff-add
297
298
}
299
+
//diff-add
298
300
]
301
+
//diff-add
299
302
],
300
303
```
301
304
@@ -306,7 +309,7 @@ Add it to Woodpecker as secret `SLACK_WEBHOOK` environment variable.
306
309
307
310
Also add this secterd to `.woodpecker.yml`:
308
311
309
-
```
312
+
```yaml title="deploy/.woodpecker.yml"
310
313
secrets:
311
314
- GITHUB_TOKEN
312
315
- NPM_TOKEN
@@ -315,9 +318,64 @@ Also add this secterd to `.woodpecker.yml`:
315
318
```
316
319
317
320
321
+
318
322
This will send notifications to Slack channel about succesfull releases when `npm run build` is done without errors.
319
-
However if you have errors in build, or have unit tests in the flow, you will not get notifications about failed releases, because `npx semantic-release` will not be executed.
320
323
321
-
To fix it we will add another slack notification plugin, moreover we will use dedicated `adminforth-developers` channel for it.
324
+
## Slack notifications about build errors and unhappen releases
325
+
326
+
327
+
Create a file `failToSlack.sh` in `deploy` directory:
0 commit comments