XRAY: How to Index and Scan All Builds in Xray in the Unified Platform

AuthorFullName__c
Prajyot Pawase
articleNumber
000004838
FirstPublishedDate
2020-06-22T07:42:09Z
lastModifiedDate
2025-05-15

XRAY: How to Index and Scan All Builds in Xray in the Unified Platform

Whenever we are trying to perform an Xray scan from the build tool and if the build fails with "Build <Build_name> is not selected for indexing", this means that the build was sent to Xray for a scan but this build is not available under Xray’s indexed resources and to overcome we need to add this build under Xray’s indexed resource which is a manual process and need to repeat the same for other new builds.

To overcome this process of repeatedly adding new builds, follow the below steps which should add all builds to be indexed,
1. Navigate to Xray | Indexed Resources settings.

Before Artifactory version 7.90.x, Platform UI --> Administration --> Xray Security & Compliance --> Indexed Resources
User-added image

After Artifactory version 7.90.x, Platform UI --> Administration --> Xray Settings & Indexed Resources
User-added image
2. Under Indexed Resources, Build tab --> Manage builds --> Add the "*/**" pattern under the include pattern, this will include all the new builds.

Before Artifactory version 7.90.x:
User-added image

After Artifactory version 7.90.x:
User-added image

After following the above steps, the error "Build <build_name> is not selected for indexing" is no more thrown and all the new builds will be indexed.

Upon following the steps, if the below error is encountered: 

Xray does not have any Watches monitoring this build, or the Watches monitoring this build do not have a CI Integration action defined.

It means that the new builds are indexed but there is no watch configured to monitor them. To overcome this behaviour, create a new watch to monitor the new build otherwise we can make use of the existing watch and use the same pattern "*/**" again in the watch section. 

Before Artifactory version 7.90.x, navigate to Application --> Security & Compliance --> Watches --> Open the watch and goto the "settings" tab 

User-added image

After Artifactory version 7.90.x, navigate to Application → Xray → Watches & Policies → Watches → Open the watch and goto the "settings" tab 
User-added image
Click on edit build and go to the "By Pattern" tab and then add the "*/**" pattern as below or check the “Any Build” option so that any build can be scanned,

Before Artifactory version 7.90.x:
User-added image
After Artifactory version 7.90.x:
User-added imageThis watch will now be able to index and scan all the new builds.
Note: Following the above process will have all the builds (old and new ones) in the same single watch.