CircleCI-Public/slack-orb
- Slack Orbital
- Slack Orb Download
- Slack Orb Definition
- Slack Orb Circleci
- Slack Orb Templates
- Slack Orbison
Everything that is not the Main Story is listed here, and as spoiler free as possible!If anyone wants to contribute with either information or images do let me know. To add a pool to our platform please send us an email at bhteam@crypto-coinz.net including the following information: - Are you the operator of the Pool - Pool name / Pool Location / Pool Fees / Pool supported coins - Pool Communication Channel: Discord/Slack/Telegram - Nick Name to contact in that communication Channel. Using Slack Integrations with CircleCI It is best to use CircleCI's Slack Orb to easily integrate custom Slack notifications into your CircleCI projects. The Orb allows users to create custom alert messages for any job or receive status updates. Note: There are old integrations of Slack that are no.
Slack Orbital
Create custom Slack notifications for CircleCI job statuses
- Users starred: 82
- Users forked: 78
- Users watching: 8
- Updated at: 2020-04-13 23:12:49
Easily integrate custom Slack notifications into your CircleCI projects. Create custom alert messages for any job or receive status updates.
Slack Orb Download
Learn more about Orbs.
Usage
Example config:
slack@1.0.0
from the circleci
namespace is imported into the config.yml as slack
and can then be referenced as such in any job or workflow.
Commands
Approval
Send a notification that a manual approval job is ready
Parameter | Type | Default | Description |
---|---|---|---|
color | string | '#3AA3E3' | Hex color value for notification attachment color. |
mentions | string | ' | A comma separated list of user IDs. No spaces. |
message | string | A workflow in CircleCI is awaiting your approval. | Enter custom message. |
url | string | 'https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}' | The URL to link back to. |
webhook | string | '${SLACK_WEBHOOK}' | Enter either your Webhook value or use the CircleCI UI to add the webhook under the 'SLACK_WEBHOOK' env var |
Slack Orb Definition
Example:
Learn more about Orbs.
Usage
Example config:
slack@1.0.0
from the circleci
namespace is imported into the config.yml as slack
and can then be referenced as such in any job or workflow.
Commands
Approval
Send a notification that a manual approval job is ready
Parameter | Type | Default | Description |
---|---|---|---|
color | string | '#3AA3E3' | Hex color value for notification attachment color. |
mentions | string | ' | A comma separated list of user IDs. No spaces. |
message | string | A workflow in CircleCI is awaiting your approval. | Enter custom message. |
url | string | 'https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}' | The URL to link back to. |
webhook | string | '${SLACK_WEBHOOK}' | Enter either your Webhook value or use the CircleCI UI to add the webhook under the 'SLACK_WEBHOOK' env var |
Slack Orb Definition
Example:
Notify
Notify a slack channel with a custom message at any point in a job with this custom step.
Parameter | Type | Default | Description |
---|---|---|---|
webhook | string | ${SLACK_WEBHOOK} | Either enter your webhook value or use the CircleCI UI to add the webhook under the SLACK_WEBHOOK environment variable |
message | string | Your job on CircleCI has completed. | Enter a custom message to send to your Slack channel |
mentions | string | false | Comma-separated list of Slack User or Group (SubTeam) IDs (e.g., 'USER1,USER2,USER3'). Note: these are Slack User IDs, not usernames. The user ID can be found on the user's profile. Look below for information on obtaining Group ID. For here , channel or everyone just write them. |
color | string | #333333 | Hex color value for notification attachment color |
author_name | string | Optional author name property for the Slack message attachment | |
author_link | string | Optional author link property for the Slack message attachment | |
author_icon | string | Optional author icon property for the Slack message attachment | |
title | string | Optional title property for the Slack message attachment | |
title_link | string | Optional title link property for the Slack message attachment | |
footer | string | Optional footer property for the Slack message attachment | |
ts | string | Optional timestamp property for the Slack message attachment | |
include_project_field | boolean | true | Condition to check if it is necessary to include the Project field in the message |
include_job_number_field | boolean | true | Whether or not to include the Job Number field in the message |
include_visit_job_action | boolean | true | Whether or not to include the Visit Job action in the message |
channel | string | ID of channel if set, overrides webhook's default channel setting |
Slack Orb Circleci
Example:
Refer to Slack's Basic message formatting documentation for guidance on formatting notification messages.
Status
Send a status alert at the end of a job based on success or failure. This must be the last step in a job.
Parameter | Type | Default | Description |
---|---|---|---|
webhook | string | ${SLACK_WEBHOOK} | Either enter your webhook value or use the CircleCI UI to add the webhook under the SLACK_WEBHOOK environment variable |
success_message | string | 🎉 A $CIRCLE_JOB job has succeeded! $SLACK_MENTIONS | Enter your custom message to send to your Slack channel |
failure_message | string | 🔴 A $CIRCLE_JOB job has failed! $SLACK_MENTIONS | Enter your custom message to send to your Slack channel |
mentions | string | Comma-separated list of Slack User or Group (SubTeam) IDs (e.g., 'USER1,USER2,USER3'). Note: these are Slack User IDs, not usernames. The user ID can be found on the user's profile. Look below for information on obtaining Group ID. | |
success_only | boolean | false | If set to true , failed jobs will not send alerts |
fail_only | boolean | false | If set to true , successful jobs will not send alerts |
only_for_branches | string | If set, a comma-separated list of branches, for which to send notifications | |
include_project_field | boolean | true | Whether or not to include the Project field in the message |
include_job_number_field | boolean | true | Whether or not to include the Job Number field in the message |
include_visit_job_action | boolean | true | Whether or not to include the Visit Job action in the message |
channel | string | ID of channel if set, overrides webhook's default channel setting |
Example:
Jobs
approval-notification
Send an approval notification message
Example:
Dependencies / Requirements
Bash Shell
Because these scripts use bash-specific features, Bash
is required.Bash
is the default shell used on CircleCI and the Orb will be compatible with most images.If using an Alpine
base image, you will need to call apk add bash
before calling this Orb,or create a derivative base image that calls RUN apk add bash
.If Bash
is not available, an error message will be logged and the task will fail.
cURL
cURL is used to post the Webhook data and must be installed in the container to function properly.
Help
How to get your Slack Webhook
Full instructions can be found at Slack: https://api.slack.com/messaging/webhooks
- Create Slack App. This will also be the name of the 'user' that posts alerts to Slack. You'll be asked for which Workspace this app belongs to.
- In the settings for the app, enable
Incoming Webhooks
. - In the left hand panel of your Slack app settings, under
Features
clickIncoming Webhooks
. - Click
Add New Webhook to Workspace
. You will be asked to pick a channel for the webhook here. - Done! A webhook URL will be created.
Slack Orb Templates
How To Get Your Group ID
- Navigate to https://api.slack.com/methods/usergroups.list/test.
- Select the correct application under 'token'.
- Press 'Test Method'.
- Find your group below and copy the value for 'ID'.
What to do with Slack Webhook
You can implement the Webhook in one of two ways, either as an environment variable, or as a parameter.
- In the settings page for your project on CircleCI, click
Environment Variables
. From that page you can click theAdd Variable
button. Finally, enter your webhook as the value, andSLACK_WEBHOOK
as the name. - You can enter the Webhook for the individual status or alert by entering it at the
webhook
parameter, as shown above.
Contributing
We welcome issues to and pull requests against this repository! For further questions/comments about this or other orbs, visit CircleCI's Orbs discussion forum.
License
This project is licensed under the MIT License - read LICENSE file for details.
Slack Orbison
QR codes > RU Pokes
|