Extended information for nodes in Jenkins - jenkins

I want to add more information to node/computer/agent entries in Jenkins (listed under <JenkinsUrl>/computer).
minimum for me would be:
URL to a wiki page (clickable)
and optimal would be in addition:
more configurable columns / fields with different types possible
URL
HTML
Text
above fields should be displayed in node/computer overview
Is this configurable in jenkins or are there plugins for that?
Motivation:
We have multiple teams sharing the same Jenkins instance and want to describe some maintenance details accessible from the jenkins node overview (e.g.: who is responsible for maintenance? Where is it hosted? How to get access?).

Related

Is there any way to ask user questions in Jenkins job parameter?

I want to ask user some questions before he/she builds. Questions will be like
Are you sure you have included all the files? (Answers: Yes, No )
Have you created a ticket in JIRA related to this fix? (Answer: Yes, No )
Is there any way I can do it? is there any plugin available for this?
A freestyle job can be configured to build with parameters. See:
https://wiki.jenkins.io/display/JENKINS/Parameterized+Build
You can configure the parameter type (string, boolean, drop down etc), give a description of the parameter and a default value. The job parameters can even include more complex things like validation rules:
https://wiki.jenkins.io/display/JENKINS/Validating+String+Parameter+Plugin
Or groovy scripts:
https://wiki.jenkins.io/display/JENKINS/Dynamic+Parameter+Plug-in
Or values shown in one parameter list change depending on the value of another:
https://wiki.jenkins.io/display/JENKINS/Active+Choices+Plugin
Your user then has to start the job by building with parameters - in effect being shown the parameter and descriptions (a bit like being asked the question).
Further validation can be done before initiating build steps using the 'Prepare an environment for the run' from the:
https://wiki.jenkins.io/display/JENKINS/EnvInject+Plugin
Build steps can be made optional based on user responses using:
https://wiki.jenkins.io/display/JENKINS/Conditional+BuildStep+Plugin
or
https://wiki.jenkins.io/display/JENKINS/Groovy+plugin
I've used all of the above to refine the choices the user has and what gets done with/because of those choices. I'm using Jenkins 2.116 in process of planning for upgrade to pipeline.
you can use input in your pipeline builds, with the questions you interested to provide to user. You can read more of usage in official doc of Jenkins here - https://jenkins.io/doc/pipeline/steps/pipeline-input-step/

Jenkins pipeline manual step permission

In our existing CD pipeline there is a manual step to push from test to production. Furthermore only certain persons can authorise this. We control this through Jenkins freestyle jobs in views with certain users having permissions to different views.
Now we are thinking about using Jenkins pipelines. There is an input step for a user to manually approve the go ahead to the next stage.
Is there a way to control who can perform the manual input? Alternatively, is there an API for progressing the pipeline, in which case we could build the tooling to let relevant users have permission.
Research
This SO post suggests it's not possible to do the API call.
This Jenkins issue tells me there is no ability to resume a pipeline that is stopped because of a failure
So far it's looking like a resounding "NO" to authorisation of manual step and progressing via API. Any other ideas appreciated.
From the documentation that you linked to, there's a submitter parameter where you can specify the allowed users/external groups allowed to respond to the input, which sounds like it should be what you're looking for.
submitter (optional)
User IDs and/or external group names of person or people permitted to respond to the input, separated by ','. If you configure "alice, bob", will match with "alice" but not with "bob". You need to remove all the white spaces.

Jenkins choice parameters from a data structure

I'm using the extended choice Jenkins plugin to allow a user to choose a group of hosts to run a job against. Right now, it's done in a naive way and each menu item is just a long list of hostnames.
What I'd like instead is something more sensible like a group name that is mapped to a data structure that can be updated easily. So, for example, the menu items would be "Prod", "Stage", etc. Even after reading the docs, I don't understand how to get that behavior with this plugin.

Jenkins: Is there a Folder/View level security plugin

I am looking for a plugin that allows for a View level security. For example I had an AD group I wish to assign to have modification/Execute permissions to ALL jobs under a specific View.
I understand that Views are just filters on the main page of Jenkins but with the quantity of plugins out there I needed to ask.
The Role Strategy Plugin worked wonders for my organization.
https://plugins.jenkins.io/role-strategy/
You cannot control access at view levels but, you can play around with folder plugin to get the desired level of access

how to call different sonar dashboard from sonar runner using Jenkins?

I have created a separate Sonar dashboard (customize dashboard) and I have different types of projects.So I want to analyse code using SonarQube and want different dashboard for different types.
I see default Sonar dashboard, all projects come but how can I separate when I call from sonar runner using Jenkins?Is there any sonar properties for this?
Thanks
It looks like you are believing that it is possible to define during the analysis the dashboard to be used. If so, this is not how it works.
I use different dashboards showing different widgets and measures in different order, specialized on a technology: I don't look at the same metrics for Java or Cobol. Now, these dashboard are available for all your analysis. Although, you could have a specific user (or different groups of users) for each technology, so when they log, they can see only dashboards specific to this group.
Hope it helps, but it's true that you question is not clear.
Regards.

Resources