You can enter a few search parameters to locate and filter the pertinent artifacts from the Artifcatory repository.

Prerequisites

Verify that you have an existing artifact task. See Add an Artifact Task.

Procedure

  1. Open an existing artifact task.
  2. Select Add By Name.
  3. Select a repository from the drop-down menu.
  4. Determine a search type and add the search parameters.

    The search type depends on your repository and artifact.

    For example, you can use the gavc search type to search for the Maven artifacts.

    Search Type

    Description and Sample Search Parameters

    gavc

    Provide a group ID, artifact ID, version ID, or classifier parameters for the search on local repositories.

    Note:

    On remote repositories the search requires a group ID, artifact ID, and version ID. You can not use the wild card character asterisk (*) as a search parameter.

    • The group ID is the organization that published the artifact.

      For example, org.springframework.

    • The artifact ID is the identifier of the artifact.

      For example, travel.

    • The version ID parameter supports the LATEST and version-SNAPSHOT keywords.

      For example, enter 4.1-SNAPSHOT to get the snapshot of a version.

    The classifier is optional and supports the wild card character asterisk (*). For example, release*, *release*, or *.

    When you start a gavc search type from an Artifactory repository, the search result displays all of the files with the same artifact name and different extensions. You can narrow the search results with the pattern search type instead.

    pattern

    Provide the artifact name or path parameters for the search on local repositories.

    Note:

    On remote repositories the search requires the complete artifact path. The artifact name is optional.

    • The name parameter supports the wild card character asterisk (*).

      For example, test*, test.*, *.jar, or *.

    • The path parameter supports the wild card character asterisk (*) for local repositories.

      For example, path/*/release searches under the path directory in the /test/release and /dev/release folders for the artifacts only in those folders.

      Each wildcard (*) represents one level in the folder structure.

    properties

    Defined in the Artifactory server to tag artifacts with custom user properties.

    These properties can be any string values. An artifact can have multiple properties and these properties can have multiple values. You can use these properties instead of the actual group ID, version, or specific path to locate an artifact in the repository.

    For example, the Property field can be artifactory.licenses and the Value field can be BSD .

    Note:

    The properties search function does not work on remote repositories. You can cache artifacts or locally tag the artifacts to use this search function.

    build

    You can not create in the Artifactory user interface. You must push a build from your CI server to the Artifactory user interface.

    • The build Name is the name of the job that is run on your CI system.

      For example, Jenkins-release.

    • The build Number supports the LATEST or a build status keyword .

      For example, you can search for builds with the Prod status.

    • The name lets you filter an artifact from the list of artifacts in a specific build.

      For example, public-API.jar or public-*.jar

      Note:

      The build search function does not work on remote repositories.

  5. Enter a temporary value in the Value text box if you use a variable as a search parameter and click Search.

    The variable is applied during the artifact configuration for the property and the temporary value is ignored.

    For example, for a gavc search type, if you use ${LATEST} as the version variable, which could be different when you run the pipeline, you must add the current version, such as 2.1 in the temporary value .

    If the search shows that an artifact does not exist, verify that the search parameters are accurate.

  6. Select one or more artifacts from the search results and click Add.
  7. Click Validate to verify that the artifact exists in the repository.

    If a variable is assigned as an artifact property, then the validation fails. You can replace the variable with an artifact property value and validate.

  8. Select one or more artifact output properties to expose to other tasks in the pipeline.

    For example, you can select to expose the artifact output and the status results in a custom task.

  9. Click Save.