-
Notifications
You must be signed in to change notification settings - Fork 84
Slack configuration
German Malykh edited this page Aug 17, 2022
·
11 revisions
To receive Slack notifications, you need to fill in the part of the configuration file referring to Slack
Configuration template for Slack notifications:
"slack": {
"token": "...",
"chat": "...",
"replyTo": ""
}
- "token" - Bot user OAuth token
- "chat" - Chat name
- "replyTo" - Leave the field blank
Next, let's look at how to get this data
- Go to https://api.slack.com/apps and click "Create New App"

2. Give name for your app and select your Workspace
3. Open your app, go to OAuth & Permissions. Grant permissions chat:write, files:write
4. Install it to your Workspace


5. Remember Bot user OAuth token
- Create new channel in your Workspace (This is value for "chat")

2. Go to APP profile and add it to channel

The final configuration will look like this:
"slack": {
"token": "xoxb-3999983300007-3888860300000-TSQbRtj9XqWeRTyPsZQ3FGD6",
"chat": "allure_test",
"replyTo": ""
}
- Download latest release https://github.com/qa-guru/allure-notifications/releases
or build .jar
gradle jar
->build/libs/allure-notifications-*.jar
- Put allure-notifications-*.jar in your in your autotests project root
- Install Post build plugin https://plugins.jenkins.io/postbuild-task
- Run .jar in postbuild task, after allure-report is generated (!!!)

java \
"-Dchat.id=#allure_notifications_channel" \
"-Dbot.token=xoxb-1687076169986-..." \
"-Dproject.name=${JOB_BASE_NAME}" \ <- jenkins environment var
"-Dbuild.launch.name=Some release 2.0" \
"-Dbuild.env=https://prod.your.site" \
"-Dbuild.report.link=${BUILD_URL}" \ <- jenkins environment var
"-Dlang=en" \
"-Denable.chart=true" \
"-Dallure.report.folder=./allure-report/" \
-jar allure-notifications-2.2.1.jar
