mirror of
https://github.com/Clortox/drone-ntfy.git
synced 2026-03-15 05:58:00 +00:00
Compare commits
5 Commits
Documentat
...
optional-u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
528a6510eb | ||
|
|
7ab1061904 | ||
|
|
4bab19d289 | ||
|
|
0ca6b05d20 | ||
|
|
cd40495ff4 |
17
main.sh
17
main.sh
@@ -6,7 +6,6 @@ Priority=${PLUGIN_PRIORITY:-}
|
|||||||
Title=${PLUGIN_TITLE:-}
|
Title=${PLUGIN_TITLE:-}
|
||||||
Tags=${PLUGIN_TAGS:-}
|
Tags=${PLUGIN_TAGS:-}
|
||||||
Click=${PLUGIN_CLICK:-}
|
Click=${PLUGIN_CLICK:-}
|
||||||
|
|
||||||
Attach=${PLUGIN_ATTACH:-}
|
Attach=${PLUGIN_ATTACH:-}
|
||||||
Icon=${PLUGIN_ICON:-}
|
Icon=${PLUGIN_ICON:-}
|
||||||
|
|
||||||
@@ -17,6 +16,10 @@ Message=${PLUGIN_MESSAGE:-Pipeline finished!}
|
|||||||
Username=${PLUGIN_USERNAME:-}
|
Username=${PLUGIN_USERNAME:-}
|
||||||
Password=${PLUGIN_PASSWORD:-}
|
Password=${PLUGIN_PASSWORD:-}
|
||||||
|
|
||||||
|
if [[ ! -z $Username ]] || [[ ! -z $Password ]]; then
|
||||||
|
UParam="-u $Username:$Password"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -z $Priority ]]; then
|
if [[ ! -z $Priority ]]; then
|
||||||
Priority="-H Priority:$Priority"
|
Priority="-H Priority:$Priority"
|
||||||
fi
|
fi
|
||||||
@@ -33,5 +36,13 @@ if [[ ! -z $Click ]]; then
|
|||||||
Click="-H Click:$Click"
|
Click="-H Click:$Click"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl $Priority $Title $Tags $Click -u $Username:$Password -d "$Message" $URL/$Topic
|
if [[ ! -z $Attach ]]; then
|
||||||
#echo curl $Priority $Title $Tags $Click -u $Username:$Password -d "$Message" $URL/$Topic
|
Attach="-H Attach:$Attach"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -z $Icon ]]; then
|
||||||
|
Icon="-H Icon:$Icon"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic
|
||||||
|
#curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic
|
||||||
|
|||||||
Reference in New Issue
Block a user