Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Jenkins hide logs, history, etc on front page?

Tags:

jenkins

I want to remove all changes, workspace links and logs from Jenkins front page.

I do not want unauthorized people, bots, etc to have access to this kind of information.

How can I do that?

like image 648
Alex Avatar asked Feb 01 '13 12:02

Alex


People also ask

How do I customize my Jenkins dashboard?

Add new view. On the Jenkins main page, click the + tab to start the new view wizard (If you do not see a +, it is likely you do not have permission to create a new view). On the create new view page, give your view a name and select the Dashboard type and click ok.

How do I remove a build log in Jenkins?

Usage. Go to a Job (Any type of) or a Folder and click on the "Purge Build History" link on the left menu. Select none or all of the options. Reset build number to 1: Resets the next build number 1 if all the builds are deleted.

Which screen in Jenkins is a convenient way to view the Jenkins log files in real time?

Log files should be at /var/log/jenkins/jenkins.

Where are Jenkins logs stored?

Linux and macOS - Jenkins logs are stored along with other log files in the /var/log directory. Windows - Jenkins log files are stored in the Jenkins home folder, which is determined during installation.


1 Answers

Set up your permissions to not allow unauthorized access

WARNING:

Make sure you have your own user/admin setup will all permission, otherwise you risk locking yourself out. If you do, use information here to reset [thanks Alex]

To configure anonymous users to not see anything:

  • Go to Manage Jenkins
  • Click Configure System/Configure Global Security (depending on your Jenkins/Hudson configuration)
  • Under Access Control -> Security Realm, you should have either Matrix-based security or Project-based Matrix Authorization Strategy. I will assume you've selected the later.
  • Under User/group to add: type authenticated and click Add
  • Now, give this group all the permissions that you want them to have.
  • Next, under User/group to add: type Anonymous and click Add
  • Make sure that none of the permissions are given to this group
  • Click Save

This way, anonymous (not-logged in) users will not be able to see anything, but authenticated (logged in) users will be able to see what you selected. You can drill-down into more specific user permissions by adding individual users and granting them certain permissions.

P.S. The user authentication depends on your Security Realm configuration. You can configure to use Active Directory/LDAP, or use Jenkin's own user database. The former means you don't have to create users in Jenkins, just give them permissions. The later means you've got to create Jenkins's users first through Manage Jenkins -> Manage Users

like image 173
Slav Avatar answered Oct 21 '22 14:10

Slav