Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
&引用;没有方法的签名“;对于Jenkins groovy中的groovy readYaml方法_Jenkins_Groovy_Yaml_Devops - Fatal编程技术网

&引用;没有方法的签名“;对于Jenkins groovy中的groovy readYaml方法

&引用;没有方法的签名“;对于Jenkins groovy中的groovy readYaml方法,jenkins,groovy,yaml,devops,Jenkins,Groovy,Yaml,Devops,我试图通过读取配置YAML文件来构建一系列类似的作业(更改参数) 但是,当我尝试使用pipeline utility steps插件(安装了2.5.0版)中的ReadyML方法时,我在尝试为其设定种子时出现以下错误: ERROR: (borg_backups.groovy, line 31) No signature of method: borg_backups.readYaml() is applicable for argument types: (java.util.LinkedHash

我试图通过读取配置YAML文件来构建一系列类似的作业(更改参数)

但是,当我尝试使用pipeline utility steps插件(安装了2.5.0版)中的ReadyML方法时,我在尝试为其设定种子时出现以下错误:

ERROR: (borg_backups.groovy, line 31) No signature of method: borg_backups.readYaml() is applicable for argument types: (java.util.LinkedHashMap) values: [[file:/var/jenkins_home/workspace/seed-job/redacted/us-west-2/borg-backups/config/borg-stage-config.yml]]
Finished: FAILURE
这是我使用它的代码片段:

environments.each { envEntry ->
    folder("$basePath/$envEntry.key") {
        displayName("$envEntry.value")
        description("Backup Jobs uploaded to Borg $envEntry.value environment")
    }

    regions.each { regionEntry ->
        String configFilePath = "redacted/$regionEntry/borg-backups/config/borg-$envEntry.key-config.yml"
        def fullTestPath = new File("$seedWorkspacePath/$configFilePath")
        if( fullTestPath.exists() ) {
            folder("$basePath/$envEntry.key/$regionEntry") {
                displayName("$regionEntry")
                description("Backup Jobs uploaded to Borg $envEntry.value environment: $regionEntry region")
            }

            def configs = readYaml (file: "$seedWorkspacePath/$configFilePath")
            if (configs.borg_environment == "stage"){
                folder("$basePath/$envEntry.key/$regionEntry/kafka") {
                    displayName(configs.services.kafka.name)
                    description("Checking if it is parsing the YAML configs correctly")
                }
            }

这是在
Jenkinsfile
中还是外部类/方法中?@MattSchuchard这是一个由seed.groovy文件加载的groovy文件:“正在处理DSL脚本jenkins jobs/borg/borg_backups.groovy”我们也在使用,因此我可能需要将脚本签名添加到已批准的脚本中,但我不确定它的签名是什么…这是在
Jenkinsfile
中还是在外部类/方法中?@MattSchuchard这是一个由seed.groovy文件加载的groovy文件:“正在处理DSL脚本jenkins jobs/borg/borg_backups.groovy”我们也在使用,所以我可能需要将脚本签名添加到已批准的文件中,但我不确定它的签名是什么。。。