Thursday, 2018-10-25

*** larainema has joined #openstack-jjb04:55
*** hashar has joined #openstack-jjb07:25
*** electrofelix has joined #openstack-jjb08:54
*** jkasik has joined #openstack-jjb10:24
jkasikHi everyone!10:24
jkasikI reecently started using JJB on MacOS10:25
jkasikpip version didn;t work for me, but brew one did10:25
jkasikNow I upgraded version in brew and on both I am getting same error:10:25
jkasikhttps://pastebin.com/fSNwhUxj10:26
jkasikWhat am I doing wrong?10:26
*** hashar is now known as hasharAway13:12
*** jkasik has quit IRC14:18
*** aricg has left #openstack-jjb15:52
*** pk64_work_ has joined #openstack-jjb18:04
pk64_work_Hi, How can I submit a api request to build a job that has parameters, but I just want the defaults. I tried an empty dictionary but no luck. server.build_job('api-test', {'param1': 'test value 1', 'param2': 'test value 2'})18:05
pk64_work_My fall back plan is to maybe source that from the xml info and assign it if an end-user does not provide parms when this exception is hit18:06
*** electrofelix has quit IRC18:31
*** pk64_work has joined #openstack-jjb18:59
pk64_workthere must be a way to submit a job that is parameterized but just accept the defaults18:59
*** pk64_work_ has quit IRC19:00
*** hasharAway is now known as hashar19:07
*** irclogbot_1 has joined #openstack-jjb20:01
*** irclogbot_1 has quit IRC20:22
*** hashar has quit IRC20:29
*** larainema has quit IRC21:02
*** irclogbot_1 has joined #openstack-jjb21:15
pk64_workI was able to work around this by getting the default parameters from the JOB XML. I'll check the bug tracker if there is one reported, but if not creating an issue for this. Collecting and submitting the default paramters works21:45
zxiiropk64_work: we do this a lot let me find an examlpe for you21:51
pk64_workah man, I did a bunch of work for nothing then? lol21:52
zxiiropk64_work: I don't know what you did, but...21:52
zxiiropk64_work: https://github.com/lfit/releng-global-jjb/blob/master/jjb/lf-maven-jobs.yaml#L501-L64921:52
zxiiropk64_work: this is how my org defines job-templates21:52
pk64_workhttps://gist.github.com/mtdeguzis/42f740c870156d807c1866b34d7a2c1f21:52
zxiiropk64_work: it allows us to define a job, with default values, AND at the same time, allows us to support github and gerrit build systems21:53
zxiirofor the same job template21:53
pk64_workThis is a condition for us, where in our jenkins-api-util around your library tries to submit a build where a user does not provide params but the job was recently updated to have them21:54
pk64_workso what I did is parse the XML, build that dictionary from the defaults, and submit it21:54
zxiiroooh so you're triggering another job21:54
zxiirothat is expecting parameters21:54
pk64_workyep21:54
pk64_workso our new routine parses the xml , gets the defaults, and submits them21:55
zxiirook misunderstood, that's entirely a different case than I thought you were talking about.21:55
pk64_workit works21:55
pk64_workI coded in choice, string, boolean for now21:55
pk64_workI hate XML and ET :(21:55
zxiirosame, XML is not really fun when you have to parse it21:55
pk64_worksample: https://gist.github.com/mtdeguzis/8b6007d1ac25fe2ea15636146e07ccba21:56
pk64_workjson is so much nice lol21:56
pk64_workI found parsing the tree to be easier, check for what I need, as going by the root was harder for me (what I know) to get the sub elements nicely21:56
pk64_worknot sure if your library could ever have a "parameters=default" toggle, that would be what I ideally would like, otherwise I will keep what i have for the foreseeable future21:57
zxiiropk64_work: feel free to submit a patch, we can discuss it and if folks like it we can pull it in.21:58
zxiiroconsidering you've already wrote a gist for it, shouldn't be too had to add it to JJB.21:58
pk64_workcan I start with a bug report to discuss? I can submit one tomorrow. Halloween parade tonight soon :)21:58
zxiiropk64_work: you're welcome to do that. Typically though most folks discuss on Gerrit.21:59
pk64_workoh.... ok. I'll review the patch process. Not sure where this hacky function would fit in just yet but i'll take a look21:59
zxiiropk64_work: to start just paste it anywhere, it will fail the verify job but at least it's a quick way for you to slap something online and we can figure out the rest later.22:00
pk64_worksure np, ill do that tomorrow then. ty for the replies. I was super happy just to get this to work22:00
zxiiropk64_work: great :)22:00

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!