jenkinsci / jenkinsci/java-client-api

[Query] I am not able to set password parameters with job.build(params)

Aperta
#415 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
913
Fork
466
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi All,

Looks like I am not able to set password parameters when triggering job builds.

My code looks more or less like this:
```
Map params = new HashMap<>();
params.put("USERNAME", "plain-text-username");
params.put("PASSWORD", "secret-password");

jenkins.getJob("job-name").build(params);
```

As the USERNAME is a generic StringParameter input it is passed properly to the build, while PASSWORD a PasswordParameter type input is not set at all.

I could see in the code all of the parameters are passed as BuildWithParameters&... URL inlined arguments which most likely block passwords. For my own scripting purposes, I use JSON payload which works with all types of inputs.

Is this possible to pass passwords with the current approach? Am I missing something here? If the issue is valid, would you consider a change of a method of passing arguments into JSON payload? I would love to contribute.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.