Home > OS >  XRAY integration with jenkins
XRAY integration with jenkins

Time:05-02

Need step to integrate XRAY with jenkins , as per the official documentation we need to give JIRA url ,select cloud or server/data center and select the credentials of JIRA account , then the configuration id will be get generated ... So we need to use that config id in pipeline

Is there any other way just to add username/password of jira in jenkins credentials and connect with XRAY from jenkins

CodePudding user response:

If you are using the Xray Jenkins plugin you must provide the mandatory information to communicate with Xray as described here: https://docs.getxray.app/display/XRAYCLOUD/Integration with Jenkins.

You also have the possibility to use the Xray API and control the parameters you need to ask for, if you pre-configure some parameters on the code and only ask for login and password. To connect to Xray you will need some mandatory parameters that are described here: https://docs.getxray.app/display/XRAYCLOUD/Version 1, how many of those you can have pre-defined is up to your usage.

CodePudding user response:

First, please check if you are using Xray on Jira cloud or Jira server/datacenter.

To submit results from Jenkins you have 3 options:

  • use the Xray Jenkins plugin UI itself, and configure a project to submit the test results; this is pretty straighforward
  • use the Xray Jenkins plugin but from the pipeline; for that you need to generate the pipeline script
  • use either the Jenkins UI or the pipeline to invoke the API by hand; for this you don't need the Xray Jenkins plugin, you just need some tool such as "curl" to perform the HTTP requests (see example for GitLab and Xray cloud here, and for Xray server/DC here)

Note that for Xray in Jira cloud, you need to use client_id and client_secret to perform an initial authentication request (in case you're doing the requests by hand). These are obtained from an API key defined on Xray global settings. For Xray on Jira server/datacenter, you may use Jira credentials (e.g. Jira username password). It only requires you to perform one request and submit the test results.

  • Related