*** larainema has joined #openstack-jjb | 04:55 | |
*** hashar has joined #openstack-jjb | 07:25 | |
*** electrofelix has joined #openstack-jjb | 08:54 | |
*** jkasik has joined #openstack-jjb | 10:24 | |
jkasik | Hi everyone! | 10:24 |
---|---|---|
jkasik | I reecently started using JJB on MacOS | 10:25 |
jkasik | pip version didn;t work for me, but brew one did | 10:25 |
jkasik | Now I upgraded version in brew and on both I am getting same error: | 10:25 |
jkasik | https://pastebin.com/fSNwhUxj | 10:26 |
jkasik | What am I doing wrong? | 10:26 |
*** hashar is now known as hasharAway | 13:12 | |
*** jkasik has quit IRC | 14:18 | |
*** aricg has left #openstack-jjb | 15:52 | |
*** pk64_work_ has joined #openstack-jjb | 18: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 hit | 18:06 |
*** electrofelix has quit IRC | 18:31 | |
*** pk64_work has joined #openstack-jjb | 18:59 | |
pk64_work | there must be a way to submit a job that is parameterized but just accept the defaults | 18:59 |
*** pk64_work_ has quit IRC | 19:00 | |
*** hasharAway is now known as hashar | 19:07 | |
*** irclogbot_1 has joined #openstack-jjb | 20:01 | |
*** irclogbot_1 has quit IRC | 20:22 | |
*** hashar has quit IRC | 20:29 | |
*** larainema has quit IRC | 21:02 | |
*** irclogbot_1 has joined #openstack-jjb | 21:15 | |
pk64_work | I 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 works | 21:45 |
zxiiro | pk64_work: we do this a lot let me find an examlpe for you | 21:51 |
pk64_work | ah man, I did a bunch of work for nothing then? lol | 21:52 |
zxiiro | pk64_work: I don't know what you did, but... | 21:52 |
zxiiro | pk64_work: https://github.com/lfit/releng-global-jjb/blob/master/jjb/lf-maven-jobs.yaml#L501-L649 | 21:52 |
zxiiro | pk64_work: this is how my org defines job-templates | 21:52 |
pk64_work | https://gist.github.com/mtdeguzis/42f740c870156d807c1866b34d7a2c1f | 21:52 |
zxiiro | pk64_work: it allows us to define a job, with default values, AND at the same time, allows us to support github and gerrit build systems | 21:53 |
zxiiro | for the same job template | 21:53 |
pk64_work | This 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 them | 21:54 |
pk64_work | so what I did is parse the XML, build that dictionary from the defaults, and submit it | 21:54 |
zxiiro | ooh so you're triggering another job | 21:54 |
zxiiro | that is expecting parameters | 21:54 |
pk64_work | yep | 21:54 |
pk64_work | so our new routine parses the xml , gets the defaults, and submits them | 21:55 |
zxiiro | ok misunderstood, that's entirely a different case than I thought you were talking about. | 21:55 |
pk64_work | it works | 21:55 |
pk64_work | I coded in choice, string, boolean for now | 21:55 |
pk64_work | I hate XML and ET :( | 21:55 |
zxiiro | same, XML is not really fun when you have to parse it | 21:55 |
pk64_work | sample: https://gist.github.com/mtdeguzis/8b6007d1ac25fe2ea15636146e07ccba | 21:56 |
pk64_work | json is so much nice lol | 21:56 |
pk64_work | I 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 nicely | 21:56 |
pk64_work | not 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 future | 21:57 |
zxiiro | pk64_work: feel free to submit a patch, we can discuss it and if folks like it we can pull it in. | 21:58 |
zxiiro | considering you've already wrote a gist for it, shouldn't be too had to add it to JJB. | 21:58 |
pk64_work | can I start with a bug report to discuss? I can submit one tomorrow. Halloween parade tonight soon :) | 21:58 |
zxiiro | pk64_work: you're welcome to do that. Typically though most folks discuss on Gerrit. | 21:59 |
pk64_work | oh.... ok. I'll review the patch process. Not sure where this hacky function would fit in just yet but i'll take a look | 21:59 |
zxiiro | pk64_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_work | sure np, ill do that tomorrow then. ty for the replies. I was super happy just to get this to work | 22:00 |
zxiiro | pk64_work: great :) | 22:00 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!