Authentication Failure with Salesforce Org in Jenkins CI/CD Pipeline


I’m currently setting up a Continuous Integration and Continuous Delivery (CI/CD) pipeline for Salesforce using Jenkins triggered by Bitbucket commits. However, I’m encountering authentication issues with the Salesforce org during pipeline execution.

Error: Upon pipeline trigger, I’m receiving an authentication failure when attempting to connect to the Salesforce org. The pipeline fails with the following error message:

Issue: Despite successfully executing the Salesforce commands manually on the Jenkins server (Ubuntu), the pipeline fails to authenticate with the Salesforce org. This suggests there might be an issue specific to the pipeline environment or configuration.

Steps Taken:

  1. Manually ran the same Salesforce commands on the Jenkins server (Ubuntu), which authenticated successfully.
  2. Checked credentials and environment variables used in the Jenkins pipeline, ensuring they match those used in the manual execution.

Request for Assistance: I would appreciate any insights or suggestions on how to resolve this authentication failure within the Jenkins CI/CD pipeline. If anyone has encountered similar issues or has expertise in Salesforce CLI authentication within Jenkins pipelines, your guidance would be greatly appreciated. Thank you in advance for your assistance!