Re: Jenkinsfile-runner + Configuration-as-Code

2018-09-07 Thread Oleg Nenashev
We had a conversation with Nicolas yesterday, and we agreed to discuss the 
the JCasC + Custom War Packager + Jenkinsfile Runner combination at the 
next JCasC meeting. Meeting date: Sep 12, 7AM UTC, Youtube link: 
https://www.youtube.com/watch?v=sxJxez8jsIw . We will also post the 
participant link in 
https://gitter.im/jenkinsci/configuration-as-code-plugin before the meeting 
starts.

BR, Oleg

P.S: Also, join our "Cloud Native Jenkins" talk  at 
DevOps World | Jenkins World, we will present an demo based on these tools.

On Thursday, September 6, 2018 at 3:46:41 PM UTC+2, James Rawlings wrote:
>
> We’ve been trying this out in Jenkins X and love it, great stuff!
>
> On 6 Sep 2018, at 14:12, Oleg Nenashev > 
> wrote:
>
> Hi all,
>
> During last weeks I have made some experiments w.r.t integrating 
> Jenkinsfile Runner and Configuration as Code.
> As a PoC, I have updated Custom War Packager 
>  and added support of 
> Jenkinsfile Runner Docker image bundling there.
> You can find a demo here: 
> https://github.com/jenkinsci/custom-war-packager/tree/master/demo/jenkinsfile-runner
>
> Generally this PoC allows producing a Docker image, which includes 
> Jenkinsfile Runner, arbitrary Jenkins plugins, and also self-configuration 
> logic powered by JCasC or, if needed, System Groovy scripts. Everything i s 
> bundled statically hence there is no performance overhead for downloading 
> plugins when the Docker image starts. Then you can run this image in Docker 
> or Kubernetes by a single command
>
> So far it uses an old version of Jenkinsfile Runner, but my plan is 
> replace it by the stock version once it is finalized. For now it is just a 
> *proof 
> of concept*, but it may be interesting for some cases.
>
> Best regards,
> Oleg
>
>
> On Tuesday, May 1, 2018 at 6:29:02 PM UTC+2, Jesse Glick wrote:
>>
>> On Tue, May 1, 2018 at 10:42 AM, nicolas de loof 
>>  wrote: 
>> >> There is a gigantic long tail of Jenkins features (mostly plugins) 
>> >> which would not work in a Build Publisher-like environment 
>> > 
>> > Not sure what you have in mind (if you have a concrete sample this 
>> could 
>> > help). 
>>
>> The first thing that pops into my head is Throttle Concurrent Builds, 
>> but I think if you start going through randomly selected plugins you 
>> will find dozens if not hundreds of examples. 
>>
>> > what I'd like to achieve is to fully remove Jenkins Web UI and only 
>> > rely on Github commit status 
>> > for user interaction […]. So plugins 
>> > would only make sense 
>> > during the build, and any UI contributing plugin would just be 
>> excluded. 
>>
>> OK, this is definitely an interesting project, but I would consider it 
>> a novel CI system with a modest degree of Jenkins compatibility. 
>>
>> > echo "entering stage foo" > /var/run/jenkins.sock 
>>
>> Or I was just thinking some kind of magic string to stdout/stderr. I 
>> have seen some scripts using ANSI control characters, or the 
>> (freestyle-compatible) plugin I mentioned before lets you configure 
>> any regexp. 
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-de...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/49cc7f1c-ca41-4bd7-b0bf-639d1a1c803c%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/e7c0c1cb-69a8-49c1-bae0-276b8cd1a71e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request to join the Security Team

2018-09-07 Thread Matt Sicker
+1 here

On Fri, Sep 7, 2018 at 9:03 AM Devin Nusbaum  wrote:

> +1
>
> On Sep 7, 2018, at 10:02, Oleg Nenashev  wrote:
>
> +1
>
> On Friday, September 7, 2018 at 9:25:35 AM UTC+2, wfoll...@cloudbees.com
> wrote:
>>
>> +1 to be able to work with us :)
>>
>> On Thursday, September 6, 2018 at 9:03:46 PM UTC+2, David Lin wrote:
>>>
>>> Hello!
>>>
>>> I'm interested in joining the Security Team. I'm an Engineering Manager
>>> at CloudBees and have vested interest in the security of Jenkins and it's
>>> related items.
>>>
>>> I've enabled 2FA on GitHub - Username: *davidbees*
>>> I've signed and added my CLA -
>>> https://github.com/jenkinsci/infra-cla/pull/63
>>> I've registered my Freenode IRC Handle - *davidbees*
>>> My Jenkins Community is also *davidbees*
>>>
>>> I'm looking forward to helping ensure the security process around
>>> Jenkins is sound as well as contributing.
>>>
>>> Thanks!
>>>
>>>  - David
>>>
>>>
>>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/7e36f58e-dbb3-40a9-bbc0-52a2a3e15872%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/F11904FD-0237-4528-B82C-C2FDA90E90E9%40cloudbees.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Sicker
Software Engineer, CloudBees

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAEot4oyXHSqFeXBMMhSWJVoRjeQU8xBCAr1Tm%2BX_-a_cqgHRig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request to join the Security Team

2018-09-07 Thread Devin Nusbaum
+1 

> On Sep 7, 2018, at 10:02, Oleg Nenashev  wrote:
> 
> +1
> 
> On Friday, September 7, 2018 at 9:25:35 AM UTC+2, wfoll...@cloudbees.com 
>  wrote:
> +1 to be able to work with us :)
> 
> On Thursday, September 6, 2018 at 9:03:46 PM UTC+2, David Lin wrote:
> Hello!
> 
> I'm interested in joining the Security Team. I'm an Engineering Manager at 
> CloudBees and have vested interest in the security of Jenkins and it's 
> related items.
> 
> I've enabled 2FA on GitHub - Username: davidbees
> I've signed and added my CLA - https://github.com/jenkinsci/infra-cla/pull/63 
> 
> I've registered my Freenode IRC Handle - davidbees
> My Jenkins Community is also davidbees
> 
> I'm looking forward to helping ensure the security process around Jenkins is 
> sound as well as contributing. 
> 
> Thanks!
> 
>  - David
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-dev+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/7e36f58e-dbb3-40a9-bbc0-52a2a3e15872%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/F11904FD-0237-4528-B82C-C2FDA90E90E9%40cloudbees.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request to join the Security Team

2018-09-07 Thread Oleg Nenashev
+1

On Friday, September 7, 2018 at 9:25:35 AM UTC+2, wfoll...@cloudbees.com 
wrote:
>
> +1 to be able to work with us :)
>
> On Thursday, September 6, 2018 at 9:03:46 PM UTC+2, David Lin wrote:
>>
>> Hello!
>>
>> I'm interested in joining the Security Team. I'm an Engineering Manager 
>> at CloudBees and have vested interest in the security of Jenkins and it's 
>> related items.
>>
>> I've enabled 2FA on GitHub - Username: *davidbees*
>> I've signed and added my CLA - 
>> https://github.com/jenkinsci/infra-cla/pull/63
>> I've registered my Freenode IRC Handle - *davidbees*
>> My Jenkins Community is also *davidbees*
>>
>> I'm looking forward to helping ensure the security process around Jenkins 
>> is sound as well as contributing. 
>>
>> Thanks!
>>
>>  - David
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/7e36f58e-dbb3-40a9-bbc0-52a2a3e15872%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tag throws Uncaught TypeError: Cannot read property 'hasClassName' of undefined in browser console

2018-09-07 Thread george . cimpoies
Thank you very much, Jesse. I've took up the task to add support for custom 
gerrit labels on gerrit-trigger-plugin, and for someone that never 
contributed to jenkins or jenkins plugins before, it's quite hard to make 
sense of how it should be done.

The use case: Considering a list of labels (which can contain any number of 
labels at each time) and that each label object has 5 particular int fields 
that represent votes (one per each build outcume - started, successful, 
failed, unstable, not built) then display each label and its corresponding 
votes in an entry inside the Gerrit Trigger job configure page.

I was able to achieve this: 

[image: job_config.PNG]


Problem: How can I persist the votes of each label since I don't know 
beforehand how many labels I have in my label list or what their names are? 
Because this means I can't use the default @DataBoundSetter mechanism that 
the plugin currently uses (1-to-1 relationship between a field on the web 
UI and the setter in the java class which gets called automatically). 
Currently I just display hardcoded values and any modifications are not 
persisted in the config.xml file.

It's something that I've been stuck on for over 2 weeks and you shedding 
some light on this will really make my day!

Thank you,
George

On Friday, September 7, 2018 at 3:32:28 PM UTC+3, Jesse Glick wrote:
>
> Perhaps my earlier message was not worded strongly enough, so I will 
> try to expand on it. 
>
> There are, broadly speaking, two kinds of Jelly code used in Jenkins 
> configuration pages. The familiar code, as exemplified in 
> `ui-samples-plugin`, uses a limited set of high-level controls which 
> all either take a `field` attribute or expect to be inside an 
> `f:entry` defining the `field`. These may specify a `default` in 
> certain cases, but `name` and `value` should not be used, nor should 
> there be extra HTML tags beyond `f:advanced` and a couple of similar 
> helpers. Each `config.jelly`, plus any associated `help.html` and/or 
> `help-fieldName.html`, corresponds to one `Describable` type, with a 
> `@DataBoundConstructor` defining mandatory fields and 
> `@DataBoundSetter`s defining optional fields. `f:textbox` completion, 
> `f:select` contents, and form validation are all done by 
> conventionally-named web methods in the `Descriptor` using 
> `@QueryParameter`. Structured forms are created by fields of type 
> `SomeOtherDescribable` or `List` and the 
> corresponding controls. Pipeline and/or JEP-201 
> (“configuration-as-code”) support generally comes for free or with 
> minimal intervention like adding `@Symbol`s. This is called “modern 
> databinding”. Virtually all plugin code should be using it, and you 
> can file bug reports or request advice on the developer list if 
> anything goes wrong. 
>
> The other kind of code uses low-level controls like `f:repeatable`. 
> This should generally only be used to _implement_ higher-level 
> controls, or to handle very specialized use cases, and only 
> experienced Jenkins developers should consider touching it as it is 
> very tricky to get right and you will in general need to use Java 
> and/or JavaScript source debuggers, HTML inspectors, etc. to track 
> down issues, which may require tested Jenkins core patches. Pipeline 
> or JEP-201 support would require custom adapters. Plenty of _existing_ 
> plugin code still uses these controls, only because the maintainers 
> were ignorant of modern databinding, or because it was written before 
> modern databinding existed and no one ever felt an immediate need to 
> rewrite the configuration forms. 
>
> I have seen no indication that you need to be using the latter 
> category. While I do not understand the exact use case, it is 
> something like: I need a list of pairs of label and some number. So 
> define a `Describable` for that kind of pair, and a top-level 
> `Describable` taking a list of them. It is up to the user to select 
> label names. You can use standard features of modern databinding to 
> offer completion or even fixed dropdowns. If the list is incomplete or 
> has duplicates or invalid labels or whatever, deal with it gracefully. 
> You would need to do that anyway for JEP-201 users who are just 
> editing a YAML file, or (if applicable) Pipeline users writing some 
> Groovy expression. 
>

-- 



Visit: itiviti.com  / ullink.com 
 »
Read the latest news from Itiviti » 





*The information contained in or 
attached to this email is strictly confidential. If you are not the 
intended recipient, please notify us immediately by telephone and return 
the message to us.*

*
*

*Email communications by definition contain 
personal information. The ITIVITI group of companies (of which ULLINK forms 
part) is subject to European data protection regulations. ULLINK’s Privacy 
Policy is available at www.ullink.com . ULLINK 
expects the recipien

Re: tag throws Uncaught TypeError: Cannot read property 'hasClassName' of undefined in browser console

2018-09-07 Thread Jesse Glick
Perhaps my earlier message was not worded strongly enough, so I will
try to expand on it.

There are, broadly speaking, two kinds of Jelly code used in Jenkins
configuration pages. The familiar code, as exemplified in
`ui-samples-plugin`, uses a limited set of high-level controls which
all either take a `field` attribute or expect to be inside an
`f:entry` defining the `field`. These may specify a `default` in
certain cases, but `name` and `value` should not be used, nor should
there be extra HTML tags beyond `f:advanced` and a couple of similar
helpers. Each `config.jelly`, plus any associated `help.html` and/or
`help-fieldName.html`, corresponds to one `Describable` type, with a
`@DataBoundConstructor` defining mandatory fields and
`@DataBoundSetter`s defining optional fields. `f:textbox` completion,
`f:select` contents, and form validation are all done by
conventionally-named web methods in the `Descriptor` using
`@QueryParameter`. Structured forms are created by fields of type
`SomeOtherDescribable` or `List` and the
corresponding controls. Pipeline and/or JEP-201
(“configuration-as-code”) support generally comes for free or with
minimal intervention like adding `@Symbol`s. This is called “modern
databinding”. Virtually all plugin code should be using it, and you
can file bug reports or request advice on the developer list if
anything goes wrong.

The other kind of code uses low-level controls like `f:repeatable`.
This should generally only be used to _implement_ higher-level
controls, or to handle very specialized use cases, and only
experienced Jenkins developers should consider touching it as it is
very tricky to get right and you will in general need to use Java
and/or JavaScript source debuggers, HTML inspectors, etc. to track
down issues, which may require tested Jenkins core patches. Pipeline
or JEP-201 support would require custom adapters. Plenty of _existing_
plugin code still uses these controls, only because the maintainers
were ignorant of modern databinding, or because it was written before
modern databinding existed and no one ever felt an immediate need to
rewrite the configuration forms.

I have seen no indication that you need to be using the latter
category. While I do not understand the exact use case, it is
something like: I need a list of pairs of label and some number. So
define a `Describable` for that kind of pair, and a top-level
`Describable` taking a list of them. It is up to the user to select
label names. You can use standard features of modern databinding to
offer completion or even fixed dropdowns. If the list is incomplete or
has duplicates or invalid labels or whatever, deal with it gracefully.
You would need to do that anyway for JEP-201 users who are just
editing a YAML file, or (if applicable) Pipeline users writing some
Groovy expression.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1uXDB%3DcUq1sCt684as6Ruq6yKUyUZCi70H%3Dh6QkmyxCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: tag throws Uncaught TypeError: Cannot read property 'hasClassName' of undefined in browser console

2018-09-07 Thread george . cimpoies
Answer: It's because you can't have entries inside 

On Friday, September 7, 2018 at 11:43:42 AM UTC+3, george@ullink.com 
wrote:
>
> I'm trying to display a list of labels inside the job configuration page 
> of Jenkins using the  tag like so:
>
> 
> 
> 
> 
> 
> ${p.labelName}
> 
> 
> 
> 
>
>
> where I've declared custom labels in my java class:
>
> private List customLabels;
>
>
> When I build the .hpi and upload it to jenkins, when refreshing the job 
> configure page I get a loading modal plus:
>
> [image: newitem.PNG]
> Anyone got an idea? Thanks!
>

-- 



Visit: itiviti.com  / ullink.com 
 »
Read the latest news from Itiviti » 





*The information contained in or 
attached to this email is strictly confidential. If you are not the 
intended recipient, please notify us immediately by telephone and return 
the message to us.*

*
*

*Email communications by definition contain 
personal information. The ITIVITI group of companies (of which ULLINK forms 
part) is subject to European data protection regulations. ULLINK’s Privacy 
Policy is available at www.ullink.com . ULLINK 
expects the recipient of this email to be compliant with ULLINK’s Privacy 
Policy and applicable regulations. Please advise us immediately at 
dataprotect...@ullink.com  if you are not 
compliant with these.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/47c62d7b-e363-4b68-b397-7b5540f84ba7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


tag throws Uncaught TypeError: Cannot read property 'hasClassName' of undefined in browser console

2018-09-07 Thread george . cimpoies
I'm trying to display a list of labels inside the job configuration page of 
Jenkins using the  tag like so:






${p.labelName}






where I've declared custom labels in my java class:

private List customLabels;


When I build the .hpi and upload it to jenkins, when refreshing the job 
configure page I get a loading modal plus:

[image: newitem.PNG] 
Anyone got an idea? Thanks!

-- 



Visit: itiviti.com  / ullink.com 
 »
Read the latest news from Itiviti » 





*The information contained in or 
attached to this email is strictly confidential. If you are not the 
intended recipient, please notify us immediately by telephone and return 
the message to us.*

*
*

*Email communications by definition contain 
personal information. The ITIVITI group of companies (of which ULLINK forms 
part) is subject to European data protection regulations. ULLINK’s Privacy 
Policy is available at www.ullink.com . ULLINK 
expects the recipient of this email to be compliant with ULLINK’s Privacy 
Policy and applicable regulations. Please advise us immediately at 
dataprotect...@ullink.com  if you are not 
compliant with these.*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/2b36b2f2-6345-4b0e-8fde-a1ac75069fb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request to join the Security Team

2018-09-07 Thread wfollonier
+1 to be able to work with us :)

On Thursday, September 6, 2018 at 9:03:46 PM UTC+2, David Lin wrote:
>
> Hello!
>
> I'm interested in joining the Security Team. I'm an Engineering Manager at 
> CloudBees and have vested interest in the security of Jenkins and it's 
> related items.
>
> I've enabled 2FA on GitHub - Username: *davidbees*
> I've signed and added my CLA - 
> https://github.com/jenkinsci/infra-cla/pull/63
> I've registered my Freenode IRC Handle - *davidbees*
> My Jenkins Community is also *davidbees*
>
> I'm looking forward to helping ensure the security process around Jenkins 
> is sound as well as contributing. 
>
> Thanks!
>
>  - David
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/94fadb73-bc75-4ce5-b9a4-d96a8f7cb710%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.