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





Overview

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

For Artifactory, you can place properties on both artifacts and folders; setting and deletingproperties 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 theUI, viaREST API, via theCLI, oron deploymentusing Matrix Parameters. Properties can also be used tocontrol 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

Explicitproperties 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 forpromotion, 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, seeGraphQL.


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 haveAnnotate Permissionscan add and edit properties in JFrog; for more information, seePermissions.

Viewing Properties in the Artifact Tree Browsers

When selecting any item in the tree browser, click itsPropertiestab 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 toArtifactoryin the Application tab and selectArtifacts.
  2. Click theSearch滤波函数,然后在类型下拉lectProperty.
    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+Addto add the key and value of the property.
    2. To search for a specific property-set, click+Addto add the key and value of the property set.
  5. ClickSearchto begin searching.

Adding and Deleting Properties

Adding Properties via the UI

When selecting any item in the tree browser, you can view itsProperties附加选项卡添加和删除属性ed to the item.

  1. To add a property, open any item in the tree browser and go to the item'sPropertiestab.
  2. In theAdd Propertyfield, 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 theRecursiveoption.
  4. ClickAddto 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删除or click thexbutton to the right of the property.
    You will be asked to confirm your deletion.
  • To remove recursively, click删除Recursivelyor 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, andartifacts(for example, to binary files).Adding properties to Release Bundles is a particularlypowerful feature, since you can use the Recursive option to apply property toall 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 theArtifacts:Propertiestab, but also from theArtifacts:Metadatatab, in which you can examine properties as they are stored in XML form. The properties XML uses thepropertiesroot 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, seeArtifactory REST APIs.

Using Properties in theCLI

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

Using Properties in theAQL

An AQL resource creates an Artifactory query using the Artifactory Query Language (AQL). This type of resource can beused in the configuration of a FileSpec resource to specify file properties to match against, and as aninputresourcefor theCreateReleaseBundlestep to define the query that is used to create a release bundle. For more information, seeAql.

Using Properties in theUser 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, seeUser 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, seeProperty 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, seeMatrix Parameters.

  • No labels
Copyright © 2022 JFrog Ltd.