Jenkins: telegram to end
This commit is contained in:
parent
6f91f1bbf6
commit
2cb0e94b6b
30
build/Jenkinsfile
vendored
30
build/Jenkinsfile
vendored
@ -1,17 +1,6 @@
|
||||
pipeline {
|
||||
agent none
|
||||
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') {
|
||||
parallel {
|
||||
stage('Unix') {
|
||||
@ -19,10 +8,9 @@ pipeline {
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
sh 'echo "$GIT_COMMIT"'
|
||||
sh 'echo "$GIT_BRANCH"'
|
||||
sh 'echo "$GIT_URL"'
|
||||
sh 'echo "$GIT_AUTHOR_NAME"'
|
||||
sh 'echo "$CHANGE_URL"'
|
||||
sh 'echo "$CHANGE_TITLE"'
|
||||
sh 'echo "$BUILD_URL"'
|
||||
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"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user