[JIRA] (JENKINS-46394) active choices reactive parameter cant load shared library

11 views
Skip to first unread message

michele.vanini@gmail.com (JIRA)

unread,
Mar 9, 2018, 11:49:02 AM3/9/18
to jenkinsc...@googlegroups.com
Michele Vanini commented on Bug JENKINS-46394
 
Re: active choices reactive parameter cant load shared library

I think that the possibility to centralize common function in a shared library it's more robust than insert code in each pipeline/job instead.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

archambaults@gmail.com (JIRA)

unread,
Jul 13, 2018, 3:31:02 PM7/13/18
to jenkinsc...@googlegroups.com

I Don't think this is a suitable solution for Tomas. He probably wanted to be able to load the "Global Pipeline Libraries" from the "Groovy Script" box in the Active Choices Parameter.

(Tomas Pavelka: correct me if im wrong)

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

vvbogdanov87@gmail.com (JIRA)

unread,
Aug 15, 2018, 8:27:02 AM8/15/18
to jenkinsc...@googlegroups.com

I would prefer to use scripts from Global Pipeline Libraries instead of @Grab or Scriptler

ingmar.karge@iav.de (JIRA)

unread,
Aug 24, 2018, 10:10:02 AM8/24/18
to jenkinsc...@googlegroups.com

I think the workaround is too inconvenient to use. I want to include my own library (which I already use in the jenkins pipeline) and not an external lib.

mbapai@gmail.com (JIRA)

unread,
Dec 6, 2018, 1:01:05 PM12/6/18
to jenkinsc...@googlegroups.com

I too would vote in favour of this feature. It would be very useful to have a single shared groovy lib that can be used across. 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

rob.gradzki@gmail.com (JIRA)

unread,
Jan 16, 2019, 10:27:02 AM1/16/19
to jenkinsc...@googlegroups.com

brunodepaulak@yahoo.com.br (JIRA)

unread,
Jan 16, 2019, 4:34:05 PM1/16/19
to jenkinsc...@googlegroups.com

Looks like this is something useful for users. Next development cycle will start looking into ways other plugins are using to support that. I really want to avoid the plugin being blacklisted again due to security issues/CVE's. So my plain is

1. learn how other plugins are working
2. create a branch with the solution
3. upload here a .hpi file with the proposed solution, and also try to release to the experimental update site (not sure if that still exists)
4. release only, and really only, if there's enough testing from users that also took into consideration possible attack vectors created by this feature (i.e. giving some thought to what issues this feature could cause... do they have a security permission model that could allow users to use dangerous libraries? did we implement in a way that the administrator him/herself could shoot his own foot and accidentally introduce a security problem in their jenkins/etc)

And once we pass step 4, and we are confident this won't introduce a security bug, cut a release. Let me know if anyone has any other suggestions, or if interested in helping with the testing/development.

Cheers
Bruno

rob.gradzki@gmail.com (JIRA)

unread,
Jan 16, 2019, 5:09:03 PM1/16/19
to jenkinsc...@googlegroups.com

rob.gradzki@gmail.com (JIRA)

unread,
Jan 16, 2019, 5:09:04 PM1/16/19
to jenkinsc...@googlegroups.com
Robert Grądzki edited a comment on Bug JENKINS-46394
I can help with the resting testing .

mikey@mikey.com (JIRA)

unread,
Aug 14, 2019, 5:59:03 PM8/14/19
to jenkinsc...@googlegroups.com

Very interested in accessing a  json file in the resources directory as defined from this facility:

https://jenkins.io/doc/book/pipeline/shared-libraries/

My use case is to read a json file and present part of the data in a active choice parameter.

danielmachadopereira@gmail.com (JIRA)

unread,
Oct 22, 2019, 3:29:03 PM10/22/19
to jenkinsc...@googlegroups.com

We have the same situation. We would love to use Active Choice directly with our pipeline. We got it working for simple stuff using:

properties([parameters([    [$class: 'org.biouno.unochoice.ChoiceParameter', name: 'Ambiente', choiceType: 'PT_RADIO', description: 'Escolha para qual ambiente o artefato devera ser implantado.', filterLength: 1, filterable: false, randomName: 'choice-parameter-47910233643731',        script: [            $class: 'org.biouno.unochoice.model.GroovyScript',            script:[                $class:'SecureGroovyScript',                script:'''return ["desenvolvimento:selected", "alfa", "beta", "producao"]'''            ]        ]    ]    ,[$class: 'org.biouno.unochoice.CascadeChoiceParameter', name: 'Servidores', choiceType: 'PT_CHECKBOX', description: 'Escolha o pool ou servidores alvo.', filterLength: 1, filterable: false, randomName: 'choice-parameter-51976913619136',        referencedParameters: 'Ambiente',        script: [            $class: 'org.biouno.unochoice.model.GroovyScript',            script:[                $class:'SecureGroovyScript',                script:'''if ("desenvolvimento".equals(Ambiente)) { return ["POOL-DESENV","D001", "D002", "D003", "D004"] } else if ("alfa".equals(Ambiente)) { return ["alfa:selected"] } else if ("beta".equals(Ambiente)) { return ["beta:selected"] } else if ("producao".equals(Ambiente)) { return ["producao:selected"] } else { return [] }'''            ],            fallbackScript:[                $class: 'SecureGroovyScript',                script: '''return["Erro na carga de servidores"]'''            ]        ]    ]

 
Working groovy as a string in the pipeline is a pain. Having to authorize this script every time you change the groovy code. If you have shared library support you don't have to ever change these scripts because de shared lib will be the one changing.
 
And then all our code will be groovy from git. Much easier to maintain. Is there a way to try an Active Choice with this feature? Or a timeline for this feature if ever.
 

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ishagunjain@gmail.com (JIRA)

unread,
Feb 10, 2020, 11:33:03 AM2/10/20
to jenkinsc...@googlegroups.com

Is this feature released? I have the same case.

burtsevyg@mail.ru (JIRA)

unread,
Feb 10, 2020, 3:48:03 PM2/10/20
to jenkinsc...@googlegroups.com

ishagunjain@gmail.com (JIRA)

unread,
Feb 11, 2020, 4:26:05 AM2/11/20
to jenkinsc...@googlegroups.com

 this could have been a great feature. 

paul.thevenot@atos.net (JIRA)

unread,
Feb 13, 2020, 9:40:03 AM2/13/20
to jenkinsc...@googlegroups.com

Same case here. This would be a nice feature. 

brunodepaulak@yahoo.com.br (JIRA)

unread,
Feb 13, 2020, 3:34:06 PM2/13/20
to jenkinsc...@googlegroups.com

If anyone knows of a plugin doing something similar, that'd be helpful. Pull requests welcome as well

brunodepaulak@yahoo.com.br (JIRA)

unread,
Feb 13, 2020, 3:34:08 PM2/13/20
to jenkinsc...@googlegroups.com

I agree, and really would like to implement it. But first would need to find either some good guidelines to avoid security issues later, or have a good amount of time to investigate possible solutions. The risk with this feature is that the plugin would be blacklisted (again) due to security issues in the implementation.

Reply all
Reply to author
Forward
0 new messages