2020-01-06 11:15:57 +00:00
|
|
|
pipeline {
|
2020-01-14 08:44:48 +00:00
|
|
|
agent none
|
|
|
|
stages {
|
2020-01-14 09:05:28 +00:00
|
|
|
stage('Build') {
|
2020-01-08 13:28:12 +00:00
|
|
|
parallel {
|
2020-01-14 08:44:48 +00:00
|
|
|
stage('Unix') {
|
2020-01-08 13:28:12 +00:00
|
|
|
agent { label 'net-core' }
|
|
|
|
stages {
|
|
|
|
stage('Components') {
|
|
|
|
steps {
|
|
|
|
sh 'sh ./build/scripts/components.sh'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Common') {
|
|
|
|
steps {
|
|
|
|
sh 'sh ./build/scripts/common.sh'
|
|
|
|
}
|
2020-01-14 08:44:48 +00:00
|
|
|
}
|
2020-01-08 13:28:12 +00:00
|
|
|
stage('Client') {
|
|
|
|
steps {
|
|
|
|
sh 'sh ./build/scripts/client.sh'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('People') {
|
|
|
|
steps {
|
|
|
|
sh 'sh ./build/scripts/people.sh'
|
|
|
|
}
|
|
|
|
}
|
2020-01-08 12:34:06 +00:00
|
|
|
}
|
|
|
|
}
|
2020-01-08 13:28:12 +00:00
|
|
|
stage('Windows') {
|
2020-09-03 15:49:43 +00:00
|
|
|
agent { label 'win-core' }
|
2020-01-08 13:28:12 +00:00
|
|
|
stages {
|
|
|
|
stage('Components') {
|
|
|
|
steps {
|
2020-01-13 13:22:41 +00:00
|
|
|
bat 'sh build\\scripts\\components.sh'
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
2020-01-08 12:34:06 +00:00
|
|
|
}
|
2020-01-08 13:28:12 +00:00
|
|
|
stage('Common') {
|
|
|
|
steps {
|
2020-01-13 13:22:41 +00:00
|
|
|
bat 'sh build\\scripts\\common.sh'
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Client') {
|
|
|
|
steps {
|
2020-01-13 13:22:41 +00:00
|
|
|
bat 'sh build\\scripts\\client.sh'
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('People') {
|
|
|
|
steps {
|
2020-01-13 13:22:41 +00:00
|
|
|
bat 'sh build\\scripts\\people.sh'
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
2020-01-08 13:02:43 +00:00
|
|
|
}
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
2020-01-08 12:34:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-01-14 09:05:28 +00:00
|
|
|
stage('Test') {
|
2020-01-14 19:21:49 +00:00
|
|
|
when { expression { return env.CHANGE_ID; } }
|
2020-01-14 09:05:28 +00:00
|
|
|
parallel {
|
|
|
|
stage('Unix') {
|
|
|
|
agent { label 'net-core' }
|
|
|
|
steps {
|
|
|
|
sh "sh ./build/scripts/components.sh && cd ${env.WORKSPACE}/web/ASC.Web.Components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
junit 'web/ASC.Web.Components/junit.xml'
|
|
|
|
publishHTML target: [
|
|
|
|
allowMissing : false,
|
|
|
|
alwaysLinkToLastBuild: false,
|
|
|
|
keepAll : true,
|
|
|
|
reportDir : 'web/ASC.Web.Components/coverage/lcov-report',
|
|
|
|
reportFiles : 'index.html',
|
|
|
|
reportName : 'Unix Test Report'
|
|
|
|
]
|
2020-01-14 12:28:14 +00:00
|
|
|
publishCoverage adapters: [coberturaAdapter('web/ASC.Web.Components/coverage/cobertura-coverage.xml')]
|
2020-01-14 09:05:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Windows') {
|
2020-09-04 11:44:58 +00:00
|
|
|
agent { label 'win-core' }
|
2020-01-14 09:05:28 +00:00
|
|
|
steps {
|
|
|
|
bat "sh build\\scripts\\components.sh && cd ${env.WORKSPACE}\\web\\ASC.Web.Components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
junit 'web\\ASC.Web.Components\\junit.xml'
|
|
|
|
publishHTML target: [
|
|
|
|
allowMissing : false,
|
|
|
|
alwaysLinkToLastBuild: false,
|
|
|
|
keepAll : true,
|
|
|
|
reportDir : 'web\\ASC.Web.Components\\coverage\\lcov-report',
|
|
|
|
reportFiles : 'index.html',
|
|
|
|
reportName : 'Windows Test Report'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-01-14 13:07:05 +00:00
|
|
|
stage('Notify') {
|
2020-01-14 19:21:49 +00:00
|
|
|
when { expression { return env.CHANGE_ID } }
|
2020-01-14 13:07:05 +00:00
|
|
|
agent { label 'net-core' }
|
|
|
|
options { skipDefaultCheckout() }
|
|
|
|
environment {
|
|
|
|
Telegram_Token = credentials('telegram_token')
|
2020-01-15 10:35:21 +00:00
|
|
|
Chat_Id = credentials('telegram_chat')
|
2020-01-14 13:07:05 +00:00
|
|
|
}
|
|
|
|
steps {
|
2020-01-15 09:13:42 +00:00
|
|
|
sh 'curl -s -X GET -G "https://api.telegram.org/bot$Telegram_Token/sendMessage" --data-urlencode "chat_id=$Chat_Id" --data "text=CHANGE URL:$CHANGE_URL %0A Build Url: $BUILD_URL %0A Branch Name:$CHANGE_TITLE"'
|
2020-01-14 13:07:05 +00:00
|
|
|
}
|
|
|
|
}
|
2020-01-06 11:15:57 +00:00
|
|
|
}
|
|
|
|
}
|