2 Commits

Author SHA1 Message Date
Tyler Perkins
528a6510eb Make curl u param more dynamic 2022-12-16 21:21:51 -05:00
Tyler Perkins
7ab1061904 Add Icon and Attachment support (#9) 2022-12-16 21:14:37 -05:00

View File

@@ -16,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
@@ -40,5 +44,5 @@ if [[ ! -z $Icon ]]; then
Icon="-H Icon:$Icon" Icon="-H Icon:$Icon"
fi fi
curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic
#curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic #curl $Priority $Title $Tags $Click $Attach $Icon $UParam -d "$Message" $URL/$Topic