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 {
|
2021-05-05 15:30:06 +00:00
|
|
|
stage('Frontend') {
|
2020-01-08 13:28:12 +00:00
|
|
|
steps {
|
2021-10-15 16:21:49 +00:00
|
|
|
sh 'yarn install --frozen-lockfile && yarn build'
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-05 15:30:06 +00:00
|
|
|
stage('Backend') {
|
2020-01-08 13:28:12 +00:00
|
|
|
steps {
|
2021-12-23 18:54:42 +00:00
|
|
|
sh 'dotnet build -c Release ASC.Web.slnf'
|
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('Windows') {
|
2020-09-03 15:49:43 +00:00
|
|
|
agent { label 'win-core' }
|
2020-01-08 13:28:12 +00:00
|
|
|
stages {
|
2021-05-05 15:30:06 +00:00
|
|
|
stage('Frontend') {
|
2020-01-08 13:28:12 +00:00
|
|
|
steps {
|
2021-10-17 17:35:58 +00:00
|
|
|
bat "yarn install --frozen-lockfile && yarn build"
|
2020-01-08 13:28:12 +00:00
|
|
|
}
|
|
|
|
}
|
2021-05-05 15:30:06 +00:00
|
|
|
stage('Backend') {
|
2020-01-08 13:28:12 +00:00
|
|
|
steps {
|
2021-12-23 18:54:42 +00:00
|
|
|
bat 'dotnet build -c Release ASC.Web.slnf'
|
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') {
|
2021-06-15 14:32:25 +00:00
|
|
|
when { expression { return env.CHANGE_ID != null } }
|
2020-01-14 09:05:28 +00:00
|
|
|
parallel {
|
|
|
|
stage('Unix') {
|
|
|
|
agent { label 'net-core' }
|
2021-01-11 16:51:45 +00:00
|
|
|
stages {
|
|
|
|
stage('Components') {
|
|
|
|
steps {
|
2022-08-22 11:26:19 +00:00
|
|
|
sh "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}/packages/components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
2021-01-11 16:51:45 +00:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
2022-08-22 11:26:19 +00:00
|
|
|
junit 'packages/components/junit.xml'
|
2021-01-11 16:51:45 +00:00
|
|
|
publishHTML target: [
|
|
|
|
allowMissing : false,
|
|
|
|
alwaysLinkToLastBuild: false,
|
|
|
|
keepAll : true,
|
2022-08-22 11:26:19 +00:00
|
|
|
reportDir : 'packages/components/coverage/lcov-report',
|
2021-01-11 16:51:45 +00:00
|
|
|
reportFiles : 'index.html',
|
|
|
|
reportName : 'Unix Test Report'
|
|
|
|
]
|
2022-08-22 11:26:19 +00:00
|
|
|
publishCoverage adapters: [coberturaAdapter('packages/components/coverage/cobertura-coverage.xml')]
|
2021-01-11 16:51:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Files') {
|
|
|
|
steps {
|
2021-12-23 18:54:42 +00:00
|
|
|
sh "git submodule update --progress --init -- products/ASC.Files/Server/DocStore && dotnet build ASC.Web.slnf && cd ${env.WORKSPACE}/products/ASC.Files/Tests/ && dotnet test ASC.Files.Tests.csproj -r linux-x64 -l \"console;verbosity=detailed\""
|
2021-01-11 16:51:45 +00:00
|
|
|
}
|
2020-01-14 09:05:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Windows') {
|
2020-09-04 11:44:58 +00:00
|
|
|
agent { label 'win-core' }
|
2021-01-11 16:51:45 +00:00
|
|
|
stages {
|
|
|
|
stage('Components') {
|
|
|
|
steps {
|
2022-08-22 11:26:19 +00:00
|
|
|
bat "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}\\packages\\components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
2021-01-11 16:51:45 +00:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
2022-08-22 11:26:19 +00:00
|
|
|
junit 'packages\\components\\junit.xml'
|
2021-01-11 16:51:45 +00:00
|
|
|
publishHTML target: [
|
|
|
|
allowMissing : false,
|
|
|
|
alwaysLinkToLastBuild: false,
|
|
|
|
keepAll : true,
|
2022-08-22 11:26:19 +00:00
|
|
|
reportDir : 'packages\\components\\coverage\\lcov-report',
|
2021-01-11 16:51:45 +00:00
|
|
|
reportFiles : 'index.html',
|
|
|
|
reportName : 'Windows Test Report'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Files') {
|
|
|
|
steps {
|
2021-12-23 18:54:42 +00:00
|
|
|
bat "git submodule update --progress --init -- products\\ASC.Files\\Server\\DocStore && dotnet build ASC.Web.slnf && cd ${env.WORKSPACE}\\products\\ASC.Files\\Tests\\ && dotnet test ASC.Files.Tests.csproj"
|
2021-01-11 16:51:45 +00:00
|
|
|
}
|
2020-01-14 09:05:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-01-14 13:07:05 +00:00
|
|
|
stage('Notify') {
|
2021-05-31 16:01:40 +00:00
|
|
|
when { expression { return env.CHANGE_ID != null && env.BUILD_NUMBER == '1' } }
|
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
|
|
|
}
|
|
|
|
}
|