Environment variables are required for Network request.
CircleCI token - https://app.circleci.com/settings/user/tokens
Slack Incoming hook url - https://api.slack.com/messaging/webhooks#posting_with_webhooks
SLACK_HOOK_URL=
CIRCLECI_TOKEN=
APPROVAL_JOB_NAME=
- Slack) Create your slack app that supports incoming webhooks and interactive components
- Slack) Get Slack incoming webhook url
- CircleCI) Get CircleCI personal token
- YourApp) Add Environment variable that
SLACK_HOOK_URL
,CIRCLECI_TOKEN
and serve your app - CircleCI) Add Environment variable that
SLACK_ACTION_URL
from step 4 - Slack) Add url to interactivty request url from step 4
- CircleCI) Add
send-slack-message
jobsend-slack-message: working_directory: ~/project docker: - image: circleci/node:latest steps: - checkout - run: name: "Setup environment variable" command: echo export APP_VERSION=$(node -e "console.log(require('./package.json').version)") >> $BASH_ENV - run: name: "Request message" command: | curl -d version=$APP_VERSION \ -d workflowId=$CIRCLE_WORKFLOW_ID \ -d branch=$CIRCLE_BRANCH \ $SLACK_ACTION_URL/circleci/react-native \
- YourApp) Add Environment variable that
APPROVAL_JOB_NAME
- CircleCI) Add approval job same with
APPROVAL_JOB_NAME