詹金斯管道:java.lang.NoSuchMethodError:没有这样的DSL方法'gitlabCommitStatus'

时间:2018-11-19 13:21:52

标签: jenkins groovy jenkins-pipeline

使用此代码,Jenkins管道中出现错误。我不明白为什么?我想念什么吗?

<ul> <li> word1</li> </ul>"

错误:

fun List<String?>.processList(action: (String) -> String): List<String> {
    var remove = false
    val dest = arrayListOf<String>()
    return filterNotNullTo(dest).mapIndexedNotNull { index, s ->
        if (remove) {
            remove = false
            null
        } else {
            if (index + 1 <= dest.lastIndex && s == dest[index + 1]) {
                remove = true
                action()
            } else {
                s
            }
        }
    }
}

val l = listOf("Q", null, "W", "E", null, "E", "E", "R", "R", "T")
val result = l.processList {"${it}gotcha"}

0 个答案:

没有答案