Skip to content

Commit

Permalink
Merge pull request #2333 from particle-iot/feature/cf-public-url-slac…
Browse files Browse the repository at this point in the history
…k-message

[ci] generate public CF url in slack notification
  • Loading branch information
avtolstoy authored Jun 25, 2021
2 parents 06fe643 + 84fafa5 commit ae01e6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ci/cf_generate_message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ if [ "${CF_PULL_REQUEST_NUMBER}" != "" ]; then
RESULT_ADDITIONAL=" (<https://github.com/${CF_REPO_OWNER}/${CF_REPO_NAME}/pull/${CF_PULL_REQUEST_NUMBER}|PR ${CF_PULL_REQUEST_NUMBER}>)"
fi

CF_BUILD_URL_PUBLIC=$(echo "${CF_BUILD_URL}" | sed -e 's|/build/|/public/accounts/particle/builds/|')

BASE_BLOCK=$(cat <<EOF
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Build <${CF_BUILD_URL}|${CF_BUILD_ID}> of <${CF_COMMIT_URL}|${CF_BRANCH}>${RESULT_ADDITIONAL} by ${CF_BUILD_INITIATOR} ${RESULT_STATUS} in ${RESULT_TIME_ELAPSED}"
"text": "Build <${CF_BUILD_URL_PUBLIC}|${CF_BUILD_ID}> of <${CF_COMMIT_URL}|${CF_BRANCH}>${RESULT_ADDITIONAL} by ${CF_BUILD_INITIATOR} ${RESULT_STATUS} in ${RESULT_TIME_ELAPSED}"
}
}
EOF
Expand Down

0 comments on commit ae01e6a

Please sign in to comment.