Jenkins: telegram to end

This commit is contained in:
pavelbannov 2020-01-14 16:07:05 +03:00
parent 6f91f1bbf6
commit 2cb0e94b6b

30
build/Jenkinsfile vendored
View File

@ -1,17 +1,6 @@
pipeline { pipeline {
agent none agent none
stages { stages {
stage('Telegram') {
agent { label 'net-core' }
options { skipDefaultCheckout() }
environment {
Telegram_Token = credentials('telegram_token')
Chat_Id = -381345297
}
steps {
sh 'curl -s -X GET "https://api.telegram.org/bot$Telegram_Token/sendMessage?chat_id=$Chat_Id&text=Test_Message"'
}
}
stage('Build') { stage('Build') {
parallel { parallel {
stage('Unix') { stage('Unix') {
@ -19,10 +8,9 @@ pipeline {
stages { stages {
stage('Components') { stage('Components') {
steps { steps {
sh 'echo "$GIT_COMMIT"' sh 'echo "$CHANGE_URL"'
sh 'echo "$GIT_BRANCH"' sh 'echo "$CHANGE_TITLE"'
sh 'echo "$GIT_URL"' sh 'echo "$BUILD_URL"'
sh 'echo "$GIT_AUTHOR_NAME"'
sh 'sh ./build/scripts/components.sh' sh 'sh ./build/scripts/components.sh'
} }
} }
@ -113,5 +101,17 @@ pipeline {
} }
} }
} }
stage('Notify') {
agent { label 'net-core' }
options { skipDefaultCheckout() }
environment {
Telegram_Token = credentials('telegram_token')
Chat_Id = -381345297
}
steps {
def message_text = '${GIT_COMMIT}'
sh 'curl -s -X GET "https://api.telegram.org/bot$Telegram_Token/sendMessage?chat_id=$Chat_Id&text=$message_text"'
}
}
} }
} }