aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-21 09:52:25 +0800
committercrupest <crupest@outlook.com>2020-07-21 09:52:25 +0800
commit10ee37dbe67c1d2f7758a0e646beb2b9c3da716c (patch)
tree284453dbb21d92b9392321083703dc54ecd0e3fa
parent8b541f2fd693614c22e0ea5cca9296a0c0c71bd3 (diff)
downloadtimeline-10ee37dbe67c1d2f7758a0e646beb2b9c3da716c.tar.gz
timeline-10ee37dbe67c1d2f7758a0e646beb2b9c3da716c.tar.bz2
timeline-10ee37dbe67c1d2f7758a0e646beb2b9c3da716c.zip
更新 Jenkinsfile
-rw-r--r--Jenkinsfile53
1 files changed, 31 insertions, 22 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 51c2695e..7176cc39 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 --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