Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
Darwcss
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
Darwcss
Commits
423dd3de
Kaydet (Commit)
423dd3de
authored
5 years ago
tarafından
Batuhan Osman TASKAYA
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gateway integration
üst
fe9728dc
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
Jenkinsfile
Jenkinsfile
+10
-16
No files found.
Jenkinsfile
Dosyayı görüntüle @
423dd3de
pipeline
{
agent
{
docker
{
image
'python:3.7.1'
}
}
environment
{
WEBHOOK_DISCORD
=
credentials
(
'discord-webhook-1'
)
TELEGRAM_TOKEN
=
credentials
(
'telegram-1'
)
TELEGRAM_CHAT
=
credentials
(
'telegram-chat'
)
GATEWAY
=
credentials
(
'gateway_key'
)
}
stages
{
stage
(
'prepare'
)
{
...
...
@@ -57,11 +55,10 @@ pipeline {
}
}
stage
(
'deploy_docs'
)
{
environment
{
TOKEN
=
credentials
(
'rtd-token'
)
}
steps
{
sh
'curl -X POST -d branches=master -d token=$TOKEN https://readthedocs.org/api/v2/webhook/darwcss/$TOKEN'
sh
"""
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss","branch": "${BRANCH_NAME}"}' 'https://gateway.kernel.live/poster/rtd'
"""
}
}
}
...
...
@@ -71,23 +68,20 @@ pipeline {
}
success
{
sh
"""
curl -H "Content-Type: application/json" \
-X POST \
-d '{"content":"Jenkins information","embeds":[{"title":"Jenkins build ","description":"Your ${env.BUILD_NUMBER}th ${currentBuild.fullDisplayName} [build](${env.BUILD_URL}) on ${BRANCH_NAME} resulted with Success","url":"${env.BUILD_URL}","color":65347,"thumbnail":{"url":"https://jenkins.io/images/logos/san-diego/san-diego.png"},"image":{"url":"https://cdn1.iconfinder.com/data/icons/basic-ui-icon-rounded-colored/512/icon-41-512.png"},"author":{"name":"Jenkins build node ${NODE_NAME}","url":"https://ci.kernel.live","icon_url":"https://wiki.jenkins.io/download/attachments/2916393/logo.png?version=1&modificationDate=1302753947000&api=v2"}}]}' $WEBHOOK_DISCORD
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss-jenkins","b_status": "success","b_name": "${BUILD_DISPLAY_NAME}"}' 'https://gateway.kernel.live/poster/discord'
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss-jenkins","b_status": "success","b_name": "${BUILD_DISPLAY_NAME}"}' 'https://gateway.kernel.live/poster/telegram'
"""
}
unstable
{
sh
"""
curl -H "Content-Type: application/json" \
-X POST \
-d '{"content":"Jenkins information","embeds":[{"title":"Jenkins build ","description":"Your ${env.BUILD_NUMBER}th ${currentBuild.fullDisplayName} [build](${env.BUILD_URL}) on ${BRANCH_NAME} resulted with Unstability","url":"${env.BUILD_URL}","color":16752128,"thumbnail":{"url":"https://jenkins.io/images/logos/san-diego/san-diego.png"},"image":{"url":"https://cdn1.iconfinder.com/data/icons/map-objects/154/map-object-warning-attention-point-512.png"},"author":{"name":"Jenkins build node ${NODE_NAME}","url":"https://ci.kernel.live","icon_url":"https://wiki.jenkins.io/download/attachments/2916393/logo.png?version=1&modificationDate=1302753947000&api=v2"}}]}' $WEBHOOK_DISCORD
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss-jenkins","b_status": "unstable","b_name": "${BUILD_DISPLAY_NAME}"}' 'https://gateway.kernel.live/poster/discord'
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss-jenkins","b_status": "unstable","b_name": "${BUILD_DISPLAY_NAME}"}' 'https://gateway.kernel.live/poster/telegram'
"""
}
failure
{
sh
"""
curl -H "Content-Type: application/json" \
-X POST \
-d '{"content":"Jenkins information","embeds":[{"title":"Jenkins build ","description":"Your ${env.BUILD_NUMBER}th ${currentBuild.fullDisplayName} [build](${env.BUILD_URL}) on ${BRANCH_NAME} resulted with Failure","url":"${env.BUILD_URL}","color":16711680,"thumbnail":{"url":"https://jenkins.io/images/logos/san-diego/san-diego.png"},"image":{"url":"https://cdn4.iconfinder.com/data/icons/unigrid-flat-basic/90/019_023_link_chain_broken_disconnect_2-512.png"},"author":{"name":"Jenkins build node ${NODE_NAME}","url":"https://ci.kernel.live","icon_url":"https://wiki.jenkins.io/download/attachments/2916393/logo.png?version=1&modificationDate=1302753947000&api=v2"}}]}' $WEBHOOK_DISCORD
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss-jenkins","b_status": "fail","b_name": "${BUILD_DISPLAY_NAME}"}' 'https://gateway.kernel.live/poster/discord'
curl -XPOST -H 'Authorization: gateway: ${GATEWAY}' -H "Content-type: application/json" -d '{"name": "darwcss-jenkins","b_status": "fail","b_name": "${BUILD_DISPLAY_NAME}"}' 'https://gateway.kernel.live/poster/telegram'
"""
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment