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

Provide a way for use of Jenkins parameter('$' in string form) instead of expected int value in fields #46

Open
wants to merge 0 commits into
base: master
Choose a base branch
from

Conversation

girishpandit88
Copy link

I see that Jenkins allows evaluation of strings at run time in lieu of providing integers in some fields.

One such place is copy artifact. I've created a pipeline job and I'm passing a paramter XYZ assigned with Build Number of upstream job to a job downstream. I tried to use the copyArtifacts(...) as follows -

steps{
copyArtifacts(downstreamUnityJob.name,"target/**"){
buildNumber("$UNITY_BUILD_NUMBER")
}
}

I get an error -
groovy.lang.MissingMethodException: No signature of method: static javaposse.jobdsl.dsl.helpers.StepContext.buildNumber() is applicable for argument types: (java.lang.String) values: [$UNITY_BUILD_NUMBER]

There should be a way to pass String parameters which are evaluated at run time.

@steve-jansen
Copy link

Hi @girishpandit88

You sent your PR to the wrong repo.

Recommend you:

  1. close this PR
  2. Rebase your branch from master
git remote add upstream git@github.com:jenkinsci/job-dsl-plugin.git`
git fetch upstream
git rebase upstream/master
git push ...
  1. Send a new PR to https://github.com/jenkinsci/job-dsl-plugin

Cheers,
Steve

@daspilker
Copy link

This repo is no longer used, use https://github.com/jenkinsci/job-dsl-plugin instead.

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