-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy_notifications.sh
52 lines (40 loc) · 1.93 KB
/
deploy_notifications.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
cd $(dirname $0)
DIR=$(pwd)
cd -
. $DIR/functions.sh
. env.sh
env_type="Dev"
GITLOG=$(git log -1 HEAD --pretty=format:%s)
if [[ ${CI_BRANCH} == "master" ]]
then
env_type="Live"
fi
#${BUILD_UTILS_DIR}/raygun/deployment.sh -v "${RELEASE}" -t "$RAYGUN_EXTERNAL_TOKEN" -a "$RAYGUN_API_KEY" -e "[email protected]" -g "${CI_SHA1}" "Branch: ${CI_BRANCH} Project ${CI_PROJECT_REPONAME} Changes: $CI_COMPARE_URL Log: ${GITLOG}"
DATE_TODAY=$(date +"%Y-%m-%d")
curl --data "key=${RESCUE_TIME_KEY}&highlight_date=$DATE_TODAY&description=${CI_PROJECT_REPONAME}+${CI_BRANCH}+${RELEASE}&source=${env_type}+Deployment" https://www.rescuetime.com/anapi/highlights_post
#
#curl -X POST -H "Content-type: application/json" -d "{\"title\":\"${CI_PROJECT_REPONAME} deployed ${RELEASE} for ${CI_BRANCH} \",\"text\":\"${CI_PROJECT_REPONAME} deployed ${RELEASE} for ${CI_BRANCH}, please see $CI_COMPARE_URL\",\"tags\":[\"${CI_PROJECT_REPONAME}\",\"${CI_BRANCH}\",\"${RELEASE}\"],\"alert_type\":\"info\"}" "https://app.datadoghq.com/api/v1/events?api_key=${DATADOG_API_KEY}"
#curl -d "apiKey=30d3924e3694ac68c5743ba00e4bf0aa&appVersion=${RELEASE}" https://notify.bugsnag.com/deploy
#curl https://sentry.io/api/hooks/release/builtin/106345/8a24068e454450b1689a71197893e46720dc007836a718af0edd29a7b2194d9f/ \
# -X POST \
# -H 'Content-Type: application/json' \
# -d "{\"version\": \"${RELEASE}\"}"
#if [[ ${CI_BRANCH} == "master" ]]
#then
#read -d '' payload <<EOF
#{
# "icon_emoji": ":tada:",
# "text": "Version ${RELEASE} codenamed ${CODENAME} released into live",
# "attachments": [
# {
# "title": "New Release",
# "title_link": "https://bizz.vizz.buzz/version/${RELEASE_NUMBER}",
# "text": "https://bizz.vizz.buzz/version/${RELEASE_NUMBER}",
# "color": "#4E86A8"
# }
# ]
#}
#EOF
#curl -X POST --data-urlencode "payload=$payload" https://chat.vizz.buzz/hooks/3fWh2rxoeuSWWudPq/y5T73Gvvebnee3rprzh2LXhT4QZ8PNecfnAH25ya6FTu7FM9
#fi