Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >

Search





Overview

Properties are user-customizable fields that can be any string and can have any value(s). Properties are used extensively in the Artifactory REST API, the CLI for JFrog Artifactory (command line tool), the Artifactory Query Language (AQL), and in the JFrog Platform UI

For Artifactory, you can place properties on both artifacts and folders; setting and deleting properties is supported by local repositories or local-cache repositories. In addition, while you cannot set or delete properties on virtual repositories, you can retrieve them. You can assign properties using the UI, via REST API, via the CLI, or on deployment using Matrix Parameters. Properties can also be used to control Artifacts resolution

In addition, properties are searchable and can be combined with Smart searches to search for items based on their properties and then to manipulate all the items in the search result in one go. Properties can also be used with integrations/extensions, such as user plugins, Jenkins plugin, etc.


Properties Use Cases 

JFrog properties can be used in many different implementations that fall under two main use cases: 

  • Explicit properties
  • Implicit properties

Explicit Properties

Explicit properties are set by the customer, are customizable, and provide functions that are Searchable and Actionable. These properties can be connected, for example, to artifacts, and then allow for promotion, state management, additional organization information, and more. 

  • Locating items in JFrog using properties: By assigning a property to an item, you can easily search for the item in JFrog using that property.
  • Combining several packages: Assign the same property to several packages, and then group the packages into one under the assigned property.
  • Applying values to multiple locations without hardcoding the values: Properties provide the flexibility of identifying an item without hardcoding its values.
  • Creating and applying properties as needed: Create and apply properties to any stage or build.

Implicit Properties

Implicit properties are JFrog Platform-generated properties and are predefined in the system, such as Last Update, Last Upload (e.g., cleanup based on these metadata). For a complete list of implicit properties and their attributes, see GraphQL.


Viewing and Searching for Properties in the UI

There are a number of ways to search and to view properties in the JFrog Platform UI.

Permissions

Only users who have Annotate Permissions can add and edit properties in JFrog; for more information, see Permissions.

Viewing Properties in the Artifact Tree Browsers

When selecting any item in the tree browser, click its Properties tab to view or edit the properties attached to the item (if any have been set).

The properties appear in the Properties list at the bottom of the window..

Searching for Properties in the UI

  1. To search for properties in the UI, go to Artifactory in the Application tab and select Artifacts.
  2. Click the Search filter function, and then in the Type dropdown, select Property.
    This opens the Search Artifacts dialog.
  3. From the Repository dropdown, select one or more repositories.
  4. Optional: 
    1. To search for a specific property, click +Add to add the key and value of the property.
    2. To search for a specific property-set, click +Add to add the key and value of the property set.
  5. Click Search to begin searching.

Adding and Deleting Properties

Adding Properties via the UI

When selecting any item in the tree browser, you can view its Properties tab to add and delete the properties attached to the item.

  1. To add a property, open any item in the tree browser and go to the item's Properties tab.
  2. In the Add Property field, enter a name and value for the property.
    You can also add multi-value properties, by entering the values separated with a semi-colon ( ; ).
  3. Optional: To add the property to the selected folder as well as to all of the artifacts, folders and sub-folders under this folder, select the Recursive option.
  4. Click Add to add the new property.


    You can add multiple properties to a single item; all properties will then appear at the bottom of the item Properties tab.

Deleting a Property or Removing Recursively

  • To delete a property, go to the list of properties, select the property and then click Delete or click the x button to the right of the property.
    You will be asked to confirm your deletion.
  • To remove recursively, click Delete Recursively or the Delete Recursively icon to the right of the property.
    You will be asked to confirm your deletion.

Adding Properties to Different Types of Resources

You can add properties to different resources including packages, builds, Release Bundles, and artifacts (for example, to binary files). Adding properties to Release Bundles is a particularly powerful feature, since you can use the Recursive option to apply property to all of the artifacts, folders and sub-folders under the folder.



Using Properties in JFrog

This section provides some examples of how to use properties in JFrog through a wide variety of interfaces and options.

Using Properties in the REST APIs

Properties are a special form of metadata that are stored on items just like any metadata - but in XML form. You can view properties not only from the Artifacts:Properties tab, but also from the Artifacts:Metadata tab, in which you can examine properties as they are stored in XML form. The properties XML uses the properties root tag and has a very simple format. As such, you can set, retrieve and remove properties from repository items via REST API, as you would do with any other XML-based metadata. For more information, see Artifactory REST APIs.

Using Properties in the CLI

JFrog CLI is a compact and smart client, which provides a simple interface for automating access to JFrog products. The CLI command enables you to set properties on any artifact in Artifactory. For more information, see Setting Properties on Files.

Using Properties in the AQL

An AQL resource creates an Artifactory query using the Artifactory Query Language (AQL). This type of resource can be used in the configuration of a FileSpec resource to specify file properties to match against, and as an inputresource for the CreateReleaseBundle step to define the query that is used to create a release bundle. For more information, see Aql.

Using Properties in the User Plugins

User plugins written in Groovy enable you to adapt Artifactory's behavior to meet your own needs, including responding to any storage events on items and properties. For more information, see User Plugins.

Using Property Sets

You can define the collections of properties called 'Property Sets' in the user interface. In each property-set you can define properties and for each property specify whether the property is open, single-value or multi-value. This impacts the UI you see when setting a property value and when searching for property values; as such, using searchable properties in artifact management is a very powerful feature. For more information, see Property Sets.

Matrix Parameters

Matrix parameters are key-value pairs parameters separated by a semicolon (;) that you can place anywhere on a URL. For more information, see Matrix Parameters.

  • No labels
Copyright © 2021 JFrog Ltd.