aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-21 10:28:55 +0800
committercrupest <crupest@outlook.com>2020-07-21 10:28:55 +0800
commit355fc87b1af69cf9a9e61ec0c1945255eb989334 (patch)
tree8db4263b8b220899766f154e94cc7475fccd9d5a
parent221ad9ecadb31de548aef7f578fadbc089c53109 (diff)
parent532f5a34bad09c3e27d6b6df58b4a6b551dec1ce (diff)
downloadtimeline-355fc87b1af69cf9a9e61ec0c1945255eb989334.tar.gz
timeline-355fc87b1af69cf9a9e61ec0c1945255eb989334.tar.bz2
timeline-355fc87b1af69cf9a9e61ec0c1945255eb989334.zip
Merge branch 'master' of e.coding.net:crupest/timeline/timeline
-rw-r--r--Jenkinsfile53
1 files changed, 31 insertions, 22 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 51c2695e..d48dccd0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,22 +1,31 @@
-pipeline {
- agent any
- stages {
- stage("检出") {
- steps {
- checkout([
- $class: 'GitSCM',
- branches: [[name: env.GIT_BUILD_REF]],
- userRemoteConfigs: [[
- url: env.GIT_REPO_URL,
- credentialsId: env.CREDENTIALS_ID
- ]]])
- }
- }
- stage('自定义构建过程') {
- steps {
- echo "自定义构建过程开始"
- // 请在此处补充您的构建过程
- }
- }
- }
-}
+pipeline {
+ agent {
+ docker {
+ image 'mcr.microsoft.com/dotnet/core/sdk'
+ reuseNode true
+ }
+
+ }
+ stages {
+ stage('检出') {
+ steps {
+ checkout([
+ $class: 'GitSCM',
+ branches: [[name: env.GIT_BUILD_REF]],
+ userRemoteConfigs: [[
+ url: env.GIT_REPO_URL,
+ credentialsId: env.CREDENTIALS_ID
+ ]]])
+ }
+ }
+ stage('构建与测试') {
+ steps {
+ sh 'dotnet test --logger:"html;LogFileName=index.html" --collect:"XPlat Code Coverage" --settings \'./Timeline.Tests/coverletArgs.runsettings\''
+ codingHtmlReport(name: 'test-result', path: 'Timeline.Tests/TestResults/', entryFile: 'index.html')
+ }
+ }
+ }
+ environment {
+ ASPNETCORE_ENVIRONMENT = 'Development'
+ }
+ } \ No newline at end of file