0

JSON オブジェクトの配列を受け取り、JSON オブジェクトを反復処理する共有ライブラリを呼び出すパイプラインを作成しました。

オブジェクトを転送できることをテストするために Jenkins ジョブを実行しようとすると、次のエラーが表示されます。

hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: imageBuild.call() is applicable for argument types: (java.lang.String) values: [[{"dockerConfig":"home/pipelines/conf/journeys/dockerbuild.yaml","aquaConfig":"home/pipelines/conf/journeys/aquascan.yaml","gtag": "v1.0.1","preFixName": "journey1"},{"dockerConfig":"home/pipelines/conf/if.com/dockerbuild.yaml","aquaConfig":"home/pipelines/conf/if.com/aquascan.yaml","gtag": "v2.0.2","preFixName": "journey2"},{"dockerConfig":"home/pipelines/conf/colleague/dockerbuild.yaml","aquaConfig":"home/pipelines/conf/colleague/aquascan.yaml","gtag": "v3.0.3","preFixName": "journey2"}]]
Possible solutions: call(), call(java.util.Map), wait(), any(), wait(long), main([Ljava.lang.String;)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)

コード:

library identifier: 'jenkins-sharedlib-cooking@BB-3611', retriever: modernSCM([$class: 'GitSCMSource',
 remote: 'https://github.com/lbg-gcp-foundation/jenkins-sharedlib-cooking-lifecycle.git',
 credentialsId: 'jenkinsPAT'])

def configList = '[{"dockerConfig":"home/pipelines/conf/journeys/dockerbuild.yaml","aquaConfig":"home/pipelines/conf/journeys/aquascan.yaml","gtag": "v1.0.1","preFixName": "journey1"},{"dockerConfig":"home/pipelines/conf/if.com/dockerbuild.yaml","aquaConfig":"home/pipelines/conf/if.com/aquascan.yaml","gtag": "v2.0.2","preFixName": "journey2"},{"dockerConfig":"home/pipelines/conf/colleague/dockerbuild.yaml","aquaConfig":"home/pipelines/conf/colleague/aquascan.yaml","gtag": "v3.0.3","preFixName": "journey2"}]'

pipeline {
  environment {
    def config = 
    brand = 
    environmentName = 
    CLUSTER_NAME = 
    CLUSTER_PROJECT = 
    VERSION = '1.0.0'
  }

  options {
    ansiColor('xterm')
    timeout(time: 150, unit: 'MINUTES')
    disableConcurrentBuilds()
    buildDiscarder(logRotator(numToKeepStr: '100'))
  }

  agent {
    kubernetes {
      label "jrn-${UUID.randomUUID().toString()}"
      yamlFile "pipelines/conf/podTemplate.yaml"
    }
  }
stages {
    stage('Stage 6 - Docker Image ') {
      parallel {
        stage ('Docker Image - Journeys') {
          steps {
            echo "*********************** Docker Journeys ***********************************"
            container('docker') {
              echo "Building the docker image..."
imageBuild(configList)
            }
            archiveArtifacts artifacts: "*.html", allowEmptyArchive: true
          }
        }
      }enter code here
    }
  }
4

1 に答える 1