Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel stages in declarative pipeline 1.2 #119

Open
balza opened this issue Mar 2, 2022 · 0 comments
Open

Parallel stages in declarative pipeline 1.2 #119

balza opened this issue Mar 2, 2022 · 0 comments

Comments

@balza
Copy link

balza commented Mar 2, 2022

Desired Behavior

I like to test a declarative pipeline

stage('Build Application') {
  failFast true
  parallel {
      stage('Create Docker Image') {
          environment {
              ECR_REPOSITORY_URL = "${GlobalVariables.ECR_REGISTRY}"
              AWS_DEFAULT_REGION = "${GlobalVariables.AWS_REGION}"
              TARGET_IMAGE = params.BUILD_TARGET_IMAGE.toLowerCase()
          }
          steps {
              script {
                  buildDocker.buildStage(env.IMAGE_TAG)
                  quality.scanECRVulnerabilities()
              }
          }
      }

      stage('SonarQube analysis [maven]') {
          agent {
              label BUILD_MAVEN_SLAVE_NAME
          }
          steps {
              script {
                  quality.sonarQubeMaven()
              }
          }
      }
  }
}

when I try to test it I get

groovy.lang.MissingMethodException: No signature of method: com.homeaway.devtools.jenkins.testing.JenkinsPipelineSpecification$_addPipelineMocksToObjects_closure1$_closure14$_closure16.doCall() is applicable for argument types: (buildDockerMaven$_call_closure1$_closure4$_closure11$_closure26) values: [buildDockerMaven$_call_closure1$_closure4$_closure11$_closure26@47fa3671] Possible solutions: doCall(java.util.Map), findAll(), findAll(), isCase(java.lang.Object), isCase(java.lang.Object)

I saw
#55
but from what I read
https://www.jenkins.io/blog/2017/09/25/declarative-1/
hey say is an old standard

Is there a way to easily test this kind of parallel pipelines?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant