Setting up Jenkins

Installing plugins for Sage X3 Automated Test Platform

Part 1: Installing the plugins

  1. Go to the URL that you use to connect to Jenkins. For example, http://myjenkinsserver:8080.
  2. If you are not already logged in, enter your administrator user credentials.
  3. Click Manage Jenkins.
  4. Click Manage Plugins.
  5. Click the Installed tab.

  6. Check the following default plugins are installed:
  7. Use the filter search to find them.

    1. Pipeline
    2. Click Pipeline to open a web page. workflow-aggregator must be included in the URL displayed.

    3. Workspace Cleanup Plugin
    4. Click Workspace Cleanup Plugin to open a web page. ws-cleanup must be included in the URL displayed.

  8. Click the Available tab.
  9. Install the following plugins:
    1. Pipeline Utility Steps
    2. Click Pipeline Utility Steps to open a web page. pipeline-utility-steps must be included in the URL displayed.

      Select the Install check box.

    3. Allure
    4. Click Allure to open a web page. allure-jenkins-plugin must be included in the URL displayed.

      Select the Install check box.

    5. Role-based Authorization Strategy
    6. Click Role-based Authorization Strategy to open a web page. role-strategy must be included in the URL displayed.

      Select the Install checkbox.

  10. Click Download now and install after restart.
  11. Click Restart Jenkins when installation is complete and no jobs are running.

  12. Click Go back to the top page.
You have been disconnected from Jenkins.

Part 2: Checking the plugins installation

  1. Go to the URL that you use to connect to Jenkins. For example, http://myjenkinsserver:8080.
  2. Enter your administrator user credentials.
  3. Click Manage Jenkins.
  4. Click Manage Plugins.
  5. Click the Installed tab.

  6. Check the following plugins are installed correctly:
  7. Use the filter search to find them.

    1. Pipeline Utility Steps
    2. Click Pipeline Utility Steps to open a web page. pipeline-utility-steps must be included in the URL displayed.

    3. Allure Jenkins Plugin
    4. Click Allure Jenkins Plugin to open a web page. allure-jenkins-plugin must be included in the URL displayed.

    5. Role-based Authorization Strategy
    6. Click Role-based Authorization Strategy to open a web page. role-strategy must be included in the URL displayed.

Setting up allure

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Global Tool Configuration.
  4. Go to the Allure Commandline section and click the Add Allure Commandline tab.
  5. Name: Type Allure.
  6. Click Apply, then Save.

Setting up Git

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Global Tool Configuration.
  4. Go to the Git section.
  5. Path to Git executable: Set to the path where Git is installed on your system.
  6. For example:

Setting up Jenkins accounts and credentials

User accounts and credentials are required to use a Jenkins Pipeline.

This guide will now refer to your Jenkins Sage X3 Automated Test Platform Pipeline as your ATP-RunAutomatedTests Pipeline.
  • User accounts: These are used by individual users to connect to Jenkins check or to execute the Jenkins Pipeline.
  • Nexus repository credentials: This user is required for your ATP-RunAutomatedTests Pipeline to connect to the Nexus npm repository in order to download the latest version of the Sage X3 Automated Test Platform library.
  • GitHub credentials (optional): This account is required if your ATP-RunAutomatedTests Pipeline should download your automated features and test scripts from your GitHub account.

Setting up a Jenkins user account

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Manage Users.
  4. Click Create User
  5. Complete the new user fields, then click Create User.
  6. Repeat these steps for each user you want to set up to use Jenkins.

Configuring global role-based security

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Configure Global Security.
  4. Go to Authorization.
  5. Select Role-Based Strategy.

  6. Click Apply, then Save.

Setting up Quality Tester roles

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Manage and Assign Roles.
  4. Click Manage Roles.

  1. Add a new role QualityTesters.
  2. Select Global roles.
  3. Role to add: QualityTesters.
  4. Click Add.
  5. To add rights to the QualityTesters role select the following check boxes:
  6. Overall: Read.

    Job: Build. Cancel. Read. Workspace.

    Run: Delete. Replay. Update.

    View: Read.

  7. Click Apply, then Save.

Assigning Quality Tester roles

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Manage and Assign Roles.
  4. Click Assign Roles.
  5. User/group to add: Type in a user name.
  6. Select the QualityTesters check box for this user name.

  1. Repeat these steps for each user you want to assign to a Quality Tester role.
  2. Click Apply, then Save.

Setting up Nexus repository credentials

  1. Go to the Jenkins home page.
  2. Click Manage Jenkins.
  3. Click Manage credentials.
  4. Click global (Domains column).

  5. Click adding some credentials ("This credential domain is empty. How about..." sentence).

  6. Complete the following fields:

    Kind: Username with password.

    Scope: Global.

    Username: The Nexus account login provided by Sage.

    Password: The Nexus account password provided by Sage.

    ID: ATP_Repository (default).

    Do not change the ID value.

    Description: ATP_Repository.

  7. Click OK.

Setting up GitHub credentials

This stage is optional. You only need to complete this stage if you want Jenkins to connect with your GitHub account that contains the automated tests that you want to execute.
  1. Go to the URL that you use to connect to Jenkins. For example, http://myjenkinsserver:8080.
  2. Click Add Credentials.

  3. Complete the following fields:

    Kind: Username with password.

    Scope: Global.

    Username: Your GitHub username.

    Password: Your GitHub access token. Refer to the Creating a personal access token GitHub documentation to know how to create an access token.

    ID: GitUser (default).

    Do not change the ID value.

    Description: GitUser.

  4. Click OK.
The ATP_Repository and GitUser credentials have now been added to Jenkins.