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

Pass param value maps back #298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Willem1987
Copy link
Contributor

@Willem1987 Willem1987 commented Sep 30, 2020

Given the build step:

stage("Call` some other build") {
                steps {
                    script {
                        build(job: "start", parameters: [string(name: 'application', value: 'All')], wait: true)
                    }
                }
            }

Shows up as:

build({job=start, parameters=[null], wait=true})

I don't see the use for the paramInterceptor outside the ParametersDeclaration. I would like to see the params a build is called with in the call stack.

UPD: Updated formatting.

@stchar
Copy link
Contributor

stchar commented Oct 1, 2020

nice catch!

@Willem1987
Copy link
Contributor Author

@stchar What kind of help would be needed? This is an MR with changes to fix including a unit test.

@stchar
Copy link
Contributor

stchar commented Oct 16, 2020

@Willem1987 Sorry I just thought that it is an issue not a PR =))

@stchar
Copy link
Contributor

stchar commented Oct 16, 2020

@Willem1987 Looks like i'm reimplementing your work in my #311

@Willem1987
Copy link
Contributor Author

@stchar I posted a comment on #311. I feel we should treat param calls inside parameters and outside the block differently. I don't want to accidentaly overwrite parameters block if i start a downstream build with the same param name.

I mostly want to temporarily log the params.

But we should decide what way to go i guess.

@Willem1987 Willem1987 force-pushed the pass-param-back-to-build branch 5 times, most recently from b1fe47b to 131cd6f Compare October 16, 2020 15:22
@Willem1987
Copy link
Contributor Author

I updated this MR and i am still don't see what the paramInterceptor would be used for here. It should be captured by the ParametersDeclaration i feel.

@felipeloha
Copy link

+1

@reinholdfuereder
Copy link
Contributor

reinholdfuereder commented Apr 1, 2021

Although I am in the context of a scripted pipeline I think I have a very similar desire/problem:

Questions (maybe also/especially to @nre-ableton):

  • Is the current default com.lesfurets.jenkins.unit.BasePipelineTest.stringInterceptor even OK/useful/correct in some context, if so in which one? But shouldn't be the default maybe more generic?
    • (UPDATED) The current default com.lesfurets.jenkins.unit.BasePipelineTest.stringInterceptor seems to be OK for withCredentials context => but in case of using parameters AND withCredentials it must be more generic!?
  • Is my desire/problem a different issue and should I therefore file a dedicated issue?
  • (Is there anything useful and easy that I should add/change in my aforementioned fork+branch to prepare a helpful PR?)

@Willem1987 Willem1987 force-pushed the pass-param-back-to-build branch from 131cd6f to 3b3754f Compare June 7, 2021 19:59
@Willem1987
Copy link
Contributor Author

@stchar i updated this mr to the new master.

@Willem1987
Copy link
Contributor Author

@nre-ableton anything i can do to get progress pr or the propertymissing?

Both issues prevent me from building tests the way id like. Id be open to further work on the prs if needed.

@reinholdfuereder
Copy link
Contributor

@nre-ableton and @sams-gleb This also links with #460 -- which I think is not the perfect way, because the logic in

is wrong with respect to withCredentials([string(credentialsId: 'gitlab-api-token', variable: 'GITLAB_API_TOKEN')]) { ...

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

Successfully merging this pull request may close these issues.

4 participants