试图在jenkins管道中循环http请求

试图在jenkins管道中循环http请求,jenkins,jenkins-pipeline,jenkins-groovy,jenkins-job-dsl,Jenkins,Jenkins Pipeline,Jenkins Groovy,Jenkins Job Dsl,我试图在Jenkins管道中完成http请求的循环。每当我运行作业时,第一个请求似乎已启动,但它没有完成,我会在之后得到以下错误:java.io.notserializableeexception:groovy.json.internal.LazyMap stage('Test') { steps { script { def testCases = new JsonSlurper().parseText(env.JIRA_TEST_CASES)

我试图在Jenkins管道中完成http请求的循环。每当我运行作业时,第一个请求似乎已启动,但它没有完成,我会在之后得到以下错误:
java.io.notserializableeexception:groovy.json.internal.LazyMap

stage('Test') {
    steps {
        script {
            def testCases = new JsonSlurper().parseText(env.JIRA_TEST_CASES)
            for (issue in testCases.issues) {
                httpRequest contentType: 'APPLICATION_JSON', httpMode: 'POST', url: url, requestBody: createBody(issue.key), authentication: auth, consoleLogResponseBody: true
            }
        }
    }
}

尝试在forloop之后添加testCases=null。让我知道它是否有效。检查这个-