tg notifications - more details
This commit is contained in:
parent
d8f30dd1c0
commit
60de6d0687
@ -4,8 +4,10 @@ source .env
|
|||||||
echo "Content-type: text/html"
|
echo "Content-type: text/html"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
COMMIT=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -n 1 --abbrev=7 --pretty=format:"%h")
|
COMMIT_ID=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -n 1 --abbrev=7 --pretty=format:"%h")
|
||||||
TGTEXT=$(echo Deployment Triggered %0A $(date "+%H:%M:%S %a %b %d %Y") %0A Current Commit id: $(echo $COMMIT) | sed "s/ /%20/g")
|
COMMIT_MSG=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -1 --pretty=format:"%s%n%b")
|
||||||
|
COMMIT_BY=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -1 --pretty=format:%an)
|
||||||
|
TGTEXT=$(echo Deployment Triggered %0A $(date "+%H:%M:%S %a %b %d %Y") %0A%0A Current Commit by: $COMMIT_BY %0A ID: $COMMIT_ID %0A Message: $COMMIT_MSG | sed "s/ /%20/g")
|
||||||
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$HONESTY_TG_CHATID'&'text=$TGTEXT
|
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$HONESTY_TG_CHATID'&'text=$TGTEXT
|
||||||
|
|
||||||
git -C /mnt/vol2/cicd/Fishie-Honesty-UI pull
|
git -C /mnt/vol2/cicd/Fishie-Honesty-UI pull
|
||||||
@ -16,9 +18,10 @@ docker compose -f /mnt/vol3/www/honestyui/docker-compose.yml pull
|
|||||||
docker compose -f /mnt/vol3/www/honestyui/docker-compose.yml down
|
docker compose -f /mnt/vol3/www/honestyui/docker-compose.yml down
|
||||||
docker compose -f /mnt/vol3/www/honestyui/docker-compose.yml up -d
|
docker compose -f /mnt/vol3/www/honestyui/docker-compose.yml up -d
|
||||||
|
|
||||||
|
COMMIT_ID=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -n 1 --abbrev=7 --pretty=format:"%h")
|
||||||
COMMIT=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -n 1 --abbrev=7 --pretty=format:"%h")
|
COMMIT_MSG=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -1 --pretty=format:"%s%n%b")
|
||||||
TGTEXT=$(echo Deployment Completed %0A $(date "+%H:%M:%S %a %b %d %Y") %0A New Commit id: $(echo $COMMIT) | sed "s/ /%20/g")
|
COMMIT_BY=$(git -C /mnt/vol2/cicd/Fishie-Honesty-UI log -1 --pretty=format:%an)
|
||||||
|
TGTEXT=$(echo Deployment Completed %0A $(date "+%H:%M:%S %a %b %d %Y") %0A%0A New Commit by: $COMMIT_BY %0A ID: $COMMIT_ID %0A Message: $COMMIT_MSG | sed "s/ /%20/g")
|
||||||
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$HONESTY_TG_CHATID'&'text=$TGTEXT
|
curl -s $TG_BOTAPI$TG_BOT_TOKEN/sendMessage?chat_id=$HONESTY_TG_CHATID'&'text=$TGTEXT
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user