Many users run Jenkins directly from Winstone like this:
$ java -jar jenkins.war
This page describes steps to quickly setup a single administrative account. If you use Jenkins without logging into the administrative account, Jenkins will be read only and you cannot change Jenkins' configuration or trigger a build. However, you can download builds, see the build results, and examine the logs. If you log into the administrative account, you may adjust Jenkins' configuration and start builds.
For users who execute Jenkins through Tomcat or some other J2EE servlet container, or for users who need more complex security arrangements, please see the Standard Security Setup directions.
usershould be the name of the administrative user, and
passwordshould be the password for that user. Also please note that the user is specified twice - once in each argument.
jenkinswith a password of
swordfishas my administrative user:
--argumentsRealmcommand line parameters.
//yourhost/jenkins/configureSecurityand select enable security, then choose Delegate to servlet container for security realm and Legacy mode for authorization strategy. Or, you may click on the Manage Jenkins link on the left side of the main Jenkins dashboard page to get to the configuration page, then click Configure Global Security.
//yourhost/jenkins/loginEntry, or click on the login link located on the top right hand corner of any Jenkins Dashboard page.
In this quick and simple set up, security on Jenkins is an all or nothing affair. If you do not turn on security, anyone may create, modify, or even delete Jenkins projects. If security is on, only the administrator may modify Jenkins projects, but developers lose the ability to force rebuilds. Fortunately, there is a way to allow developers to force rebuilds without giving them the ability to modify Jenkins itself.
jenkinsHostis the URL for your Jenkins Host (example: jenkins:8080)
projectis the name of your project or job
tokenis the token string that you entered into the Authentication Token field
If you have a Webserver, you can create a webpage with the URL. Here's an example below:
<h1>Jenkins Force Build Page</h1> <ul> <li> <a href="http://jenkins:8080/job/FOO/build?token=build">Force build of Project FOO on Jenkins</a> </li> </ul>
The above code is to force a build on the Jenkins server jenkins that uses port 8080 for project FOO. It assumes that the string entered into the Authentication Token field was build.
The preceding instructions require that anonymous users have read access to Jenkins. If you disable overall read access for anonymous users, the Build Token Root Plugin allows use of tokens.