aboutsummaryrefslogtreecommitdiff
path: root/Jenkinsfile
blob: 8d4e558ff7be70ab7e36ae7ee03ff8e99e85172f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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:"junit;LogFileName=test-result.xml" --collect:"XPlat Code Coverage" --settings \'./Timeline.Tests/coverletArgs.runsettings\''
          junit 'Timeline.Tests/TestResults/test-result.xml'
        }
      }
    }
    environment {
      ASPNETCORE_ENVIRONMENT = 'Development'
    }
  }