Difference between revisions of "Set Up Jenkins CLI User"

From Lingoport Wiki
Jump to: navigation, search
Line 31: Line 31:
 
* Click "'''Create User'''"
 
* Click "'''Create User'''"
   
== Configure the security for the Lingobot user ==
+
== Configure the security for the jenkins_cli user ==
   
 
* Return once again to the "'''Configure Global Security'''" page ('''Manage Jenkins > Configure Global Security''') and scroll down to the "'''Authorization'''" section.
 
* Return once again to the "'''Configure Global Security'''" page ('''Manage Jenkins > Configure Global Security''') and scroll down to the "'''Authorization'''" section.
Line 37: Line 37:
 
* Verify that Administrator has Administer access checked.
 
* Verify that Administrator has Administer access checked.
 
* In the "'''User/group to add'''" field under Matrix-based security, enter "jenkins_cli" and click add. This should result in jenkins_cli being added as a row in the security matrix above.
 
* In the "'''User/group to add'''" field under Matrix-based security, enter "jenkins_cli" and click add. This should result in jenkins_cli being added as a row in the security matrix above.
* Enable the following security permissions for the lingobot account:
+
* Enable the following security permissions for the jenkins_cli account:
 
** Under "Overall"
 
** Under "Overall"
 
*** Read
 
*** Read
Line 54: Line 54:
 
* Click "'''Save'''" and log out if you were logged in as Administrator.
 
* Click "'''Save'''" and log out if you were logged in as Administrator.
   
== Get the Lingobot Jenkins Token ==
+
== Get the jenkins_cli Jenkins Token ==
   
 
* Log in as the newly created "jenkins_cli" account using the password you just created.
 
* Log in as the newly created "jenkins_cli" account using the password you just created.

Revision as of 21:53, 10 July 2020

The first step in the configuration process is to create a Jenkins user which the Jenkins CLI can have access to. The Jenkins CLI is used by the Lingoport Product Suite, so it is very important that the configuration is done correctly.

Please follow these instructions closely for the best results!

Create the Jenkins CLI user

Manage users.png
  • Navigate to your Lingoport Jenkins instance in a web browser.
  • If an admin account has been configured, log in as the admin (otherwise no login is necessary) and click on the "Manage Jenkins" menu item on the left hand side of the window. (indicated by a small gear icon).
    • If you don't see this menu item, this means the current account does not have administrative privileges.
  • Click on "Configure Global Security", and on this page make sure that the following boxes are checked:
    • Security Realm: Jenkins' own user database
    • Authorization: One of the authorization methods (preferably "Matrix-based security").
      • IMPORTANT: If Matrix-based security is selected and no users have been configured yet, make sure that "Anonymous Users" has Administration privileges (The Administer box is checked and all others are greyed-out).
  • Once this is done, click "Save".
  • If this is the first time configuring security, the next page will prompt you to "Create First Admin User"
    • Username: admin
    • Password: <your choice>
    • Full name: Administrator
    • E-mail address: <your choice>
  • Select Create First Admin User and you will be logged in as Administrator (see upper-right side of screen)
  • Select "Manage Jenkins"
  • Scroll down and click on "Manage Users", and on this page, select "Create User" from the left hand menu and fill out the form with the following information:
    • Username: "jenkins_cli"
    • Password: Choose a secure password.
    • Confirm Password: Repeat your previous entry
    • Full Name: "Jenkins CLI Automation"
    • Email: "support@lingoport.com"
  • Click "Create User"

Configure the security for the jenkins_cli user

  • Return once again to the "Configure Global Security" page (Manage Jenkins > Configure Global Security) and scroll down to the "Authorization" section.
  • Un-select Administer access for Anonymous Users. No boxes should be checked.
  • Verify that Administrator has Administer access checked.
  • In the "User/group to add" field under Matrix-based security, enter "jenkins_cli" and click add. This should result in jenkins_cli being added as a row in the security matrix above.
  • Enable the following security permissions for the jenkins_cli account:
    • Under "Overall"
      • Read
    • Under "Job"
      • Build
      • Cancel
      • Configure
      • Create
      • Delete
      • Read
      • Workspace
    • Under "View"
      • Configure
      • Read
  • Agent → Master Security: Select Enable Agent --> Master Access Control
  • Click "Save" and log out if you were logged in as Administrator.

Get the jenkins_cli Jenkins Token

  • Log in as the newly created "jenkins_cli" account using the password you just created.
  • Once logged in, in the top-right hand corner of the window, click on the account name (Jenkins CLI Automation)
  • Select "Configure" from the menu on the left (or from the dropdown menu below the account-name button)
  • On this page there should be a section called "API Token" and a corresponding button labeled "Show API Token..." or Add new Token. Click this button. If adding a new token, it can be named anything, it is just a label.
  • Copy the API Token that is displayed.
  • Build the jenkins job ConfigJenkinsCLI using Build with Parameters. Paste the token into the password field.

Confirm that the job finishes successfully (it will test to see if it can login with the token).