I dont want "Restrict where this project can be run"

51 views
Skip to first unread message

rahul gupta

unread,
Mar 16, 2016, 7:31:31 AM3/16/16
to Jenkins Developers

Hi Team,

 

I am new to this group but using Jenkins from last many years. I need one help/suggestion before I start writing own Jenkins Plug-in.

 

Issue:

 

On Every Jenkins job configuration, we have option "Restrict where this project can be run". I don't want this option visible to the developers who configure.

I couldn’t find any alternate so planning to write own plugin.

 

Kindly suggest.

 

Kr,

Rahul



Oleg Nenashev

unread,
Mar 16, 2016, 10:40:51 AM3/16/16
to Jenkins Developers
Hi,

AFAIK there is no feature in Jenkins core allowing to hide it. I doubt you can solve it via plugin.
Could you clarify the use-case?
  • Why do you want to hide it?
  • What behavior do you expect from Jenkins scheduler when it's hidden?

In any case, you can hide the control using siome Javascript code in SimpleThemePlugin.


BR, Oleg


среда, 16 марта 2016 г., 12:31:31 UTC+1 пользователь rahul gupta написал:

rahul gupta

unread,
Mar 16, 2016, 10:50:56 AM3/16/16
to jenkin...@googlegroups.com
Thanks Oleg for prompt response.

I need not to show this option cause few Developers in my team can use this option to execute jobs on different application slave.

Could u please suggest few pointers on writing this simplethemeplugin.

Kr,
Rahul
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/A9xkR8tYHL8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b255b274-0e2c-4491-8b70-61d0fc158772%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Sent from iPhone

Brian Stinson

unread,
Mar 16, 2016, 11:12:18 AM3/16/16
to jenkin...@googlegroups.com
On Mar 16 07:40, Oleg Nenashev wrote:
> Hi,
>
> AFAIK there is no feature in Jenkins core allowing to hide it. I doubt you
> can solve it via plugin.
> Could you clarify the use-case?
>
> - Why do you want to hide it?
> - What behavior do you expect from Jenkins scheduler when it's hidden?
>
> In any case, you can hide the control using siome Javascript code in
> SimpleThemePlugin.
>
>
> BR, Oleg
>
> среда, 16 марта 2016 г., 12:31:31 UTC+1 пользователь rahul gupta написал:
> >
> >
> > Hi Team,
> >
> >
> >
> > I am new to this group but using Jenkins from last many years. I need one
> > help/suggestion before I start writing own Jenkins Plug-in.
> >
> >
> >
> > *Issue:*
> >
> >
> >
> > On Every Jenkins job configuration, we have option "Restrict where this
> > project can be run". I don't want this option visible to the developers who
> > configure.
> >
> > I couldn’t find any alternate so planning to write own plugin.
> >
> >
> >
> > Kindly suggest.
> >
> >
> >
> > Kr,
> >
> > Rahul
> >
> >
> >
> >

I can think of a use-case where you would want to administratively set
the labels based on username/group in a multi-tenant installation.

Example:
jobs created by users in the 'project1' group always get routed to the
'project1' label

Cheers!

--Brian

R. Tyler Croy

unread,
Mar 16, 2016, 11:15:22 AM3/16/16
to jenkin...@googlegroups.com
(replies inline)

On Wed, 16 Mar 2016, rahul gupta wrote:

> Thanks Oleg for prompt response.
>
> I need not to show this option cause few Developers in my team can use this
> option to execute jobs on different application slave.
>
> Could u please suggest few pointers on writing this simplethemeplugin.


You might find this plugin useful as a more viable alternative:
https://wiki.jenkins-ci.org/display/JENKINS/Job+Restrictions+Plugin


Hidding things in the UI doesn't mean that they're technically hidden, and a
savy user can still find them.


Another option is to simply use the Matrix authorization plugin and restrict
users from having the Job/Configure permission



> On Wednesday, 16 March 2016, Oleg Nenashev <o.v.ne...@gmail.com> wrote:
>
> > Hi,
> >
> > AFAIK there is no feature in Jenkins core allowing to hide it. I doubt you
> > can solve it via plugin.
> > Could you clarify the use-case?
> >
> > - Why do you want to hide it?
> > - What behavior do you expect from Jenkins scheduler when it's hidden?
> >
> > In any case, you can hide the control using siome Javascript code in
> > SimpleThemePlugin.
> >
> >
> > BR, Oleg
> >
> > ??????????, 16 ?????????? 2016 ??., 12:31:31 UTC+1 ???????????????????????? rahul gupta ??????????????:
> >>
> >>
> >> Hi Team,
> >>
> >>
> >>
> >> I am new to this group but using Jenkins from last many years. I need one
> >> help/suggestion before I start writing own Jenkins Plug-in.
> >>
> >>
> >>
> >> *Issue:*
> >>
> >>
> >>
> >> On Every Jenkins job configuration, we have option "Restrict where this
> >> project can be run". I don't want this option visible to the developers who
> >> configure.
> >>
> >> I couldn???t find any alternate so planning to write own plugin.
> >>
> >>
> >>
> >> Kindly suggest.
> >>
> >>
> >>
> >> Kr,
> >>
> >> Rahul
> >>
> >>
> >>
> >> --
> > You received this message because you are subscribed to a topic in the
> > Google Groups "Jenkins Developers" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/jenkinsci-dev/A9xkR8tYHL8/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > jenkinsci-de...@googlegroups.com
> > <javascript:_e(%7B%7D,'cvml','jenkinsci-dev%2Bunsu...@googlegroups.com');>
> > .
> > <https://groups.google.com/d/msgid/jenkinsci-dev/b255b274-0e2c-4491-8b70-61d0fc158772%40googlegroups.com?utm_medium=email&utm_source=footer>
> > .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
> --
> Sent from iPhone
>
> --
> 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/CAA50s%2BAFspugMqg4ooD-TLrVBJM5amOk1n2DwMOB7Qa12TKHug%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

- R. Tyler Croy

------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>

% gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
------------------------------------------------------
signature.asc

domi

unread,
Mar 16, 2016, 11:15:26 AM3/16/16
to Jenkins Developers
You can define some restrictions on where a job is allowed to be executed with this https://wiki.jenkins-ci.org/display/JENKINS/Job+Restrictions+Plugin
/Domi

-- 
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.

Oleg Nenashev

unread,
Mar 16, 2016, 11:30:14 AM3/16/16
to Jenkins Developers
After getting the use-case, +1 from me on Job Restrictions.
I've designed it for such use-cases.

среда, 16 марта 2016 г., 16:15:26 UTC+1 пользователь Dominik Bartholdi написал:
Reply all
Reply to author
Forward
0 new messages