Merge pull request #23 from ONLYOFFICE/feature/jenkins-file
Feature/jenkins file
This commit is contained in:
commit
bf76392316
115
build/Jenkinsfile
vendored
Normal file
115
build/Jenkinsfile
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
stage('Build') {
|
||||
parallel {
|
||||
stage('Unix') {
|
||||
agent { label 'net-core' }
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
sh 'sh ./build/scripts/components.sh'
|
||||
}
|
||||
}
|
||||
stage('Common') {
|
||||
steps {
|
||||
sh 'sh ./build/scripts/common.sh'
|
||||
}
|
||||
}
|
||||
stage('Client') {
|
||||
steps {
|
||||
sh 'sh ./build/scripts/client.sh'
|
||||
}
|
||||
}
|
||||
stage('People') {
|
||||
steps {
|
||||
sh 'sh ./build/scripts/people.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Windows') {
|
||||
agent { label 'master' }
|
||||
stages {
|
||||
stage('Components') {
|
||||
steps {
|
||||
bat 'sh build\\scripts\\components.sh'
|
||||
}
|
||||
}
|
||||
stage('Common') {
|
||||
steps {
|
||||
bat 'sh build\\scripts\\common.sh'
|
||||
}
|
||||
}
|
||||
stage('Client') {
|
||||
steps {
|
||||
bat 'sh build\\scripts\\client.sh'
|
||||
}
|
||||
}
|
||||
stage('People') {
|
||||
steps {
|
||||
bat 'sh build\\scripts\\people.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
when { expression { return env.CHANGE_ID; } }
|
||||
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'
|
||||
]
|
||||
publishCoverage adapters: [coberturaAdapter('web/ASC.Web.Components/coverage/cobertura-coverage.xml')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Windows') {
|
||||
agent { label 'master' }
|
||||
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'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Notify') {
|
||||
when { expression { return env.CHANGE_ID } }
|
||||
agent { label 'net-core' }
|
||||
options { skipDefaultCheckout() }
|
||||
environment {
|
||||
Telegram_Token = credentials('telegram_token')
|
||||
Chat_Id = credentials('telegram_chat')
|
||||
}
|
||||
steps {
|
||||
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"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -7,23 +7,16 @@ call start\stop.bat
|
||||
PUSHD %~dp0..
|
||||
|
||||
echo "ASC.Web.Components"
|
||||
call yarn install --cwd web/ASC.Web.Components --frozen-lockfile > build\ASC.Web.Components.log
|
||||
call yarn link --cwd packages/asc-web-components
|
||||
call build\scripts\components.sh
|
||||
|
||||
echo "ASC.Web.Common"
|
||||
call yarn link "asc-web-components" --cwd web/ASC.Web.Common
|
||||
call yarn install --cwd web/ASC.Web.Common --frozen-lockfile > build\ASC.Web.Common.log
|
||||
call yarn link --cwd packages/asc-web-common
|
||||
call build\scripts\common.sh
|
||||
|
||||
echo "ASC.Web.Client"
|
||||
call yarn link "asc-web-components" --cwd web/ASC.Web.Client
|
||||
call yarn link "asc-web-common" --cwd web/ASC.Web.Client
|
||||
call yarn install --cwd web/ASC.Web.Client --frozen-lockfile > build\ASC.Web.Client.log
|
||||
call build\scripts\client.sh
|
||||
|
||||
echo "ASC.Web.People.Client"
|
||||
call yarn link "asc-web-components" --cwd products/ASC.People/Client
|
||||
call yarn link "asc-web-common" --cwd products/ASC.People/Client
|
||||
call yarn install --cwd products/ASC.People/Client --frozen-lockfile > build\ASC.Web.People.Client.log
|
||||
call build\scripts\people.sh
|
||||
|
||||
xcopy build\cra\*.* products\ASC.People\Client\node_modules\ /E /R /Y
|
||||
|
||||
|
3
build/scripts/client.sh
Normal file
3
build/scripts/client.sh
Normal file
@ -0,0 +1,3 @@
|
||||
yarn link "asc-web-components" --cwd web/ASC.Web.Client
|
||||
yarn link "asc-web-common" --cwd web/ASC.Web.Client
|
||||
yarn install --cwd web/ASC.Web.Client --frozen-lockfile
|
3
build/scripts/common.sh
Normal file
3
build/scripts/common.sh
Normal file
@ -0,0 +1,3 @@
|
||||
yarn link "asc-web-components" --cwd web/ASC.Web.Common
|
||||
yarn install --cwd web/ASC.Web.Common --frozen-lockfile
|
||||
yarn link --cwd packages/asc-web-common
|
2
build/scripts/components.sh
Normal file
2
build/scripts/components.sh
Normal file
@ -0,0 +1,2 @@
|
||||
yarn install --cwd web/ASC.Web.Components --frozen-lockfile
|
||||
yarn link --cwd packages/asc-web-components
|
3
build/scripts/people.sh
Normal file
3
build/scripts/people.sh
Normal file
@ -0,0 +1,3 @@
|
||||
yarn link "asc-web-components" --cwd products/ASC.People/Client
|
||||
yarn link "asc-web-common" --cwd products/ASC.People/Client
|
||||
yarn install --cwd products/ASC.People/Client --frozen-lockfile
|
@ -16,4 +16,11 @@ module.exports = {
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
||||
'<rootDir>/test/transform-file.js'
|
||||
},
|
||||
coverageReporters: [
|
||||
"json",
|
||||
"lcov",
|
||||
"text",
|
||||
"clover",
|
||||
"cobertura"
|
||||
]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user