pipeline: parameters documentation.

392 views
Skip to first unread message

Kenneth Johansson

unread,
Apr 26, 2017, 12:43:39 PM4/26/17
to Jenkins Users
hmm I'm starting to question the usefulness of the pipeline system. Its
very hard to understand how to do even very basic stuff.

Even something as easy as finding out what type of parameters I can use
is hard.

The documentation on https://jenkins.io/doc/book/pipeline/syntax/ only
mention string and booleanParam. but since I wrote something wrong I got
a error message so now I know that I can use. booleanParam, choice,
file, text, password, run, string

But how do the syntax for it look ?? How do I find that out. is there
some java source I can read or is this implemented in some other groovy
script?

------------

here is what the section on parameters say .

-------
Required No
Parameters None
Allowed Only once, inside the pipeline block.

---------

then it lists string and booleanParam as parameters. the thing it
mentioned as none just a few lines above. :(

------------------------



Björn Pedersen

unread,
Apr 26, 2017, 2:14:04 PM4/26/17
to Jenkins Users, kenneth....@inteno.se


Am Mittwoch, 26. April 2017 14:43:39 UTC+2 schrieb Kenneth Johansson:
hmm I'm starting to question the usefulness of the pipeline system. Its
very hard to understand how to do even very basic stuff.

Even something as easy as finding out what type of parameters I can use
is hard.

The documentation on https://jenkins.io/doc/book/pipeline/syntax/ only
mention string and booleanParam. but since I wrote something wrong I got
a error message so now I know that I can use. booleanParam, choice,
file, text, password, run, string

If look below the example on the source you quote, you'll  see:
***

A comprehensive list of available parameters is pending the completion of INFRA-1503.

***
 
The declarative syntax for pipeline is really quite young and still work in progress.

Björn

Kenneth Johansson

unread,
Apr 26, 2017, 2:31:53 PM4/26/17
to Björn Pedersen, Jenkins Users
But why is it then the only thing that is documented. If you go to https://jenkins.io/ then push the documentation tab you end up in the pipeline documentation. its basically the only documentation existing so If I'm not supposed to use it what should I use then ?

From my point of view it looks like I can not actually use this for real work. looks like I need to make my own plugin. This pipeline thing is just not at a state where it can be used. 

Björn


Craig Rodrigues

unread,
Jul 23, 2018, 11:57:15 PM7/23/18
to Jenkins Users, kenneth....@inteno.se
I stumbled across the same problem.  On this page:


it specifies that the valid parameter values are:

booleanParam, choice, file, text, password, run, or string

It would be nice if the official docs at

could be updated to reflect this.

I had to hunt around to find this.  INFRA-1503 has not been completed yet.
--
Craig



--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7021479a-b6ca-40d7-b3da-8bdf98f1030f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Craig Rodrigues

unread,
Aug 14, 2018, 5:26:40 AM8/14/18
to Jenkins Users, kenneth....@inteno.se
I submitted this pull request which got accepted:

https://github.com/jenkins-infra/jenkins.io/pull/1711

and now there are more examples of parameters at:


for text, choice, password, booleanParam, and file parameters.
--
Craig

Craig Rodrigues

unread,
Aug 14, 2018, 5:32:18 AM8/14/18
to Jenkins Users, kenneth....@inteno.se
Today, I also learned about the new Declarative Directive Generator which is available
in the latest Jenkins and pipeline distributions:: https://jenkins.io/blog/2018/04/09/whats-in-declarative/

If you use that and click on Sample Directive -> parameters: Parameters
then you can see the different types of parameters which are available, and the
code necessary to use them.
 --
Craig
Reply all
Reply to author
Forward
0 new messages