*** openstack has joined #openstack-jjb | 01:20 | |
*** ChanServ sets mode: +o openstack | 01:20 | |
*** rakkaus_ has joined #openstack-jjb | 07:13 | |
*** hashar has joined #openstack-jjb | 07:34 | |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: fixup https://review.openstack.org/577749 | 08:19 |
---|---|---|
*** electrofelix has joined #openstack-jjb | 08:58 | |
*** r-mibu has joined #openstack-jjb | 09:04 | |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577628 | 09:10 |
rakkaus_ | hello guys! that ^ is my change, I don't have much experience with gerrit, I've squashed commits but I still see several commits in "related changes" can some one help me with making this change proposal valid? | 09:23 |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577766 | 09:45 |
rakkaus_ | how can I run pep8 checks locally? | 09:58 |
rakkaus_ | I run `tox` it does not fail locally | 09:58 |
openstackgerrit | Dennis Dmitriev proposed openstack/python-jenkins master: Check for 'Location' header in the response https://review.openstack.org/572179 | 09:59 |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577775 | 10:08 |
electrofelix | rakkaus_: if you just run 'tox' it will run all defined envs and tox is by default configured to continue even if one of the envs fails, so you probably need to explicitly run just the one you need 'tox -e pep8' see the 11 tasks on the failed ARA report http://logs.openstack.org/28/577628/2/check/tox-pep8/fa47df4/ara-report/ | 10:21 |
rakkaus_ | yeah, thanks I found what was causing failures in logs here http://logs.openstack.org/66/577766/1/check/tox-pep8/cdaf14b/job-output.txt.gz | 10:23 |
rakkaus_ | so I've updated my changes https://review.openstack.org/577775 now passing | 10:24 |
*** caphrim007_ has quit IRC | 10:26 | |
*** caphrim007 has joined #openstack-jjb | 10:26 | |
*** r-mibu has quit IRC | 12:19 | |
ssbarnea | zxiiro: electrofelix Odd_Bloke : i am still in vacation but regarding reviews i think is to use common sense, complex/risky reviews should keep needing 2x2 but simple ones with very low risk are ok to use only 1x1. | 12:22 |
ssbarnea | there is an important reason for flexing the rules: adding or fixing support for a corner case plugin, something that has very few users. | 12:23 |
ssbarnea | if we follow 2x2 rule the change may never get merged because it would be close to impossible to get enough interest from others to get any votes. | 12:24 |
*** caphrim007 has quit IRC | 13:07 | |
*** dje2991 has joined #openstack-jjb | 13:14 | |
dje2991 | Hello guys | 13:15 |
dje2991 | I'm a bit new to jenkins job builder and try to play with templates and Jinja2 expension, is there somebody around that can help? | 13:15 |
dje2991 | I think the issue is that Jinja2 templates can only be used to expend into a string, but not as yaml objects, is that right? | 13:17 |
dje2991 | here is what I'm trying to do | 13:17 |
dje2991 | https://www.irccloud.com/pastebin/OzYi1TWz/default.yaml | 13:18 |
dje2991 | https://www.irccloud.com/pastebin/VSogr62g/jobs.yaml | 13:18 |
Odd_Bloke | dje2991: o/ | 13:19 |
dje2991 | the error I'm getting is | 13:19 |
dje2991 | File "/home/jguichar/.local/lib/python2.7/site-packages/jenkins_jobs/modules/triggers.py", line 517, in gerrit | 13:19 |
dje2991 | 'compare-type', file_path.get('compare-type', 'PLAIN')) | 13:19 |
dje2991 | AttributeError: 'unicode' object has no attribute 'get' | 13:19 |
Odd_Bloke | Yeah, I think you've basically nailed the problem; the Jinja2 stuff has only been implemented to replace string templating ATM. | 13:20 |
dje2991 | :) | 13:20 |
Odd_Bloke | "The tag !include-jinja2: will treat the given string or list of strings as filenames to be opened as Jinja2 templates, which should be rendered to a string and included in the calling YAML construct." | 13:21 |
dje2991 | so what would be the recomended way to do what I'm trying | 13:21 |
dje2991 | aka have a yaml object that can be replicated multiple time | 13:21 |
Odd_Bloke | (And !j2 is the "inline string" version of !include-jinja2.) | 13:21 |
Odd_Bloke | I don't know that there really is a great way of doing it. :( | 13:23 |
dje2991 | IC | 13:23 |
dje2991 | then the other solution I had in mind was if there was a way to add configs into a template that was included | 13:24 |
dje2991 | say I would have the trigger template that contains my | 13:24 |
dje2991 | 'generic' elements | 13:24 |
dje2991 | and then just add to it (in the job definition) the extra file-paths configurations.... is there a way to do that? | 13:25 |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577775 | 13:27 |
Odd_Bloke | dje2991: http://paste.ubuntu.com/p/C3grqRXR5n/ seems to DTRT for me locally. | 13:31 |
dje2991 | interestin | 13:32 |
dje2991 | interesting | 13:32 |
*** caphrim007 has joined #openstack-jjb | 13:33 | |
dje2991 | what version are you using | 13:33 |
dje2991 | ? | 13:33 |
dje2991 | I tried with 2.0.10 | 13:33 |
Odd_Bloke | trunk | 13:33 |
zxiiro | Odd_Bloke: I'm surprisd that worked. you should have had to use a {ob:var} declaration there | 13:34 |
zxiiro | Odd_Bloke: It should be file-paths: '{obj:file_paths}' | 13:34 |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577628 | 13:35 |
Odd_Bloke | Both spellings produce the same output for me here. | 13:36 |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577628 | 13:37 |
*** caphrim007 has quit IRC | 13:38 | |
Odd_Bloke | I'm not sure if we could (meaningfully) use Jinja2 to template YAML output, because I don't think we have the context (i.e. parameters/variables) available to us at the point we generate the YAML. | 13:42 |
Odd_Bloke | I _think_ the assumption is that the YAML is static, and strings in the YAML are templated. | 13:43 |
Odd_Bloke | But I may be missing something; that part of the JJB codebase is still something of a mystery to me. | 13:43 |
dje2991 | IC, I think I will work this around for the time being and will try later when I'll have a bit more time | 13:44 |
dje2991 | just trying to run using trunk to see if I can get what Odd_Bloke got | 13:45 |
Odd_Bloke | dje2991: Did you try the {obj:...} syntax that zxiiro suggested? | 13:46 |
dje2991 | No I did not | 13:46 |
Odd_Bloke | That might be worth a punt. | 13:46 |
dje2991 | https://www.irccloud.com/pastebin/7DPDTKi4/ | 13:47 |
dje2991 | somthing like this? | 13:47 |
Odd_Bloke | Ah, no; the Jinja2 stuff definitely won't work. | 13:48 |
Odd_Bloke | I thought you were trying the "pass in the full section" approach I suggested and still seeing failures. | 13:48 |
Odd_Bloke | (And I was wondering if you were seeing different results because you were doing '{file_paths}' rather than '{obj:file_paths}'.) | 13:49 |
dje2991 | ho!!! IC | 13:49 |
dje2991 | so code snippet you sent do not raise error anymore | 13:56 |
dje2991 | but block for the file-paths is not added | 13:56 |
Odd_Bloke | dje2991: So the snippet at http://paste.ubuntu.com/p/C3grqRXR5n/ is raising an error for you locally? | 13:58 |
Odd_Bloke | Could you pastebin the error? | 13:58 |
dje2991 | ha wait I had one missing line | 13:59 |
dje2991 | :D | 13:59 |
zxiiro | dje2991: when using "obj:var" notation you cannot use dashes in the name. You must use underscores. | 13:59 |
zxiiro | it's a bug I'm not sure if we ever fixed | 13:59 |
dje2991 | now it seems to work | 14:00 |
dje2991 | this makes exactly what I wanted | 14:00 |
dje2991 | many thanks! | 14:00 |
Odd_Bloke | \o/ | 14:03 |
*** rakkaus_ is now known as riuvshyn | 14:14 | |
openstackgerrit | Roman Iuvshyn proposed openstack-infra/jenkins-job-builder master: Adds wrapper for vault plugin https://review.openstack.org/577628 | 15:30 |
*** electrofelix has quit IRC | 15:44 | |
*** caphrim007 has joined #openstack-jjb | 15:44 | |
*** caphrim007 has quit IRC | 15:45 | |
*** caphrim007 has joined #openstack-jjb | 15:45 | |
*** caphrim007 has quit IRC | 15:46 | |
*** caphrim007 has joined #openstack-jjb | 15:46 | |
*** riuvshyn has quit IRC | 15:55 | |
*** riuvshyn has joined #openstack-jjb | 16:25 | |
*** riuvshyn has quit IRC | 17:52 | |
*** riuvshyn has joined #openstack-jjb | 17:53 | |
*** riuvshyn has quit IRC | 17:57 | |
*** riuvshyn has joined #openstack-jjb | 19:03 | |
*** riuvshyn has quit IRC | 19:10 | |
Odd_Bloke | dje2991: Oh, by the way, another way we've addressed this (where we have a small N of cases) is !include: "{some-variable}.yaml.inc", and then had a separate file for each case. | 19:26 |
Odd_Bloke | We only have 2 different values for {some-variable} where we use this, though; I don't think it would scale well much beyond that. | 19:26 |
openstackgerrit | Jef Mallal proposed openstack-infra/jenkins-job-builder master: Add XUnit processing plugin to builders https://review.openstack.org/468175 | 19:36 |
*** riuvshyn has joined #openstack-jjb | 20:21 | |
*** riuvshyn has quit IRC | 20:30 | |
*** hashar has quit IRC | 21:48 | |
*** riuvshyn has joined #openstack-jjb | 22:30 | |
*** riuvshyn has quit IRC | 22:35 | |
*** caphrim007_ has joined #openstack-jjb | 23:03 | |
*** caphrim007 has quit IRC | 23:06 | |
*** caphrim007_ has quit IRC | 23:09 | |
*** caphrim007 has joined #openstack-jjb | 23:11 | |
*** caphrim007 has quit IRC | 23:14 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!