如何使用脚本管道在Stride中获取Jenkins构建通知

时间:2018-12-06 17:31:19

标签: asp.net-core jenkins-pipeline

如何使用脚本化管道在Stride中获取Jenkins通知?

node{ stage1... stage2... etc }

我正在使用以下代码构建和测试我的项目:

node {
    stage 'Checkout'
        checkout scm

    stage 'Build'
        bat "\"C:/Program Files/dotnet/dotnet.exe\" restore \"${workspace}/MyProg.sln\""
        bat "\"C:/Program Files/dotnet/dotnet.exe\" build \"${workspace}/MyProg.sln\""

    stage 'UnitTests'
        bat returnStatus: true, script: "\"C:/Program Files/dotnet/dotnet.exe\" test \"${workspace}/MyProg.sln\" --logger \"trx;LogFileName=unit_tests.xml\" --no-build"
        step([$class: 'MSTestPublisher', testResultsFile:"**/unit_tests.xml", failOnError: true, keepLongStdio: true])
}

尝试建立声明性管道:

pipeline {agent any stages {stage('Build') {... 

我收到此错误:

java.lang.NoSuchMethodError: No such DSL method 'steps' found among steps [archive, bat,.......       

我该如何解决?

0 个答案:

没有答案