search cancel

Jenkins trying to checkout EAR file for update in SCM and the build is failing.

book

Article ID: 242964

calendar_today

Updated On:

Products

CA Harvest Software Change Manager

Issue/Introduction

We are having an issue in Jenkins trying to checkout EAR file for update in SCM and the build is failing.

Here is the last step that failed showing HCO command.

11:15:33 checkout-Artifact:

11:15:33      [echo] Checkout for update - ear file : ProjectName.ear

11:15:33      [echo] hco  -b  -eh /app/CI/3.0/Jenkins/custom/config/.enc -en Project_Name -st DEV -p RM9026_B -vp \Project_Name\deploy -cp /app/CI/3.0/Jenkins/workspace/SI_Java_Services_Folder/Project_Name/deploy -pn Check Out for Update -up  -r  -o /app/CI/3.0/Jenkins/workspace/SI_Java_Services_Folder/Project_Name/Log_Name.log

11:15:33

11:15:33 BUILD FAILED

11:15:33 /app/CI/3.0/Jenkins/custom/scripts/HarvestIntegration.xml:107: exec returned: 3

Cause

The user and/or group did not have permission to do checkouts.  

Environment

Release : 14.0

Component :

Resolution

Verify that the userid that Jenkins uses belongs to user groups

Follow the steps below:

  • Log in to Jenkins using the existing administrative user account credentials.

  • Navigate to the “Manage Jenkins -> Manage Users” page.

  • Select the “Create User” option.

  • Enter a username, password, name and email address to create a new user. This will become the new administrative user. In the image below, the user is named admin.

    Jenkins user account creation

  • Save the new account.

  • Navigate to the “Manage Jenkins -> Configure Global Security” page.

  • In the “Access Control -> Authorization” section, select “Matrix-based security”.

    • In the “User/group to add” field below the matrix, enter the existing administrative user account and click “Add”.

    • Ensure that all privileges are disabled for this user except Overall (Read) and Agent (Build, Configure, Connect, Create, Delete, Disconnect).

    • In the “User/group to add” field below the matrix, enter the new administrative user account created above (in this example, admin).

    • Ensure that all privileges are enabled for this user.

      The end result should look like the image below:

      Jenkins matrix security

  • Click “Save” to save and apply the changes.

Additional Information

Jenkins User Credentials information

https://www.jenkins.io/doc/book/using/using-credentials/

Jenkins user groups and roles

https://www.thegeekstuff.com/2017/03/jenkins-users-groups-roles/