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

Search





Overview

An Aql resource specifies an Artifactory query using Artifactory Query Language


An Aql resource can be used in the configuration of a FileSpec resource to specify file properties to match against.

An Aql resource can be used as an inputresource for the CreateReleaseBundle step. It defines the query that is used to create a release bundle. 

Page Contents


YAML Schema

The YAML schema for Aql:

resources:
  - name: 			<string>
    type: Aql
    configuration:
      sourceArtifactory:   <artifactory integration name>
      query:               <string>
      addedProperties:
        key1:              val1
        key2:              val2
      mappings: 
        - name: mapping1
          input:    
          output: 
        - name: mapping2
          input:    
          output: 

Tags

name 

An alphanumeric string (underscores are permitted) that identifies the resource.

type 

Must be Aql for this resource type.

configuration

Specifies all configuration selections for the resource.

Tag

Description

Required/Optional
sourceArtifactory The name of an Artifactory Integration.Required
query 

An Artifactory Query Language query string.

Required

addedProperties

List of added properties that will be added to the artifacts after distribution of the release bundle.

  • key - Property key to be created or updated after distribution of the release bundle.
  • valueList of values to be added to the property key after distribution of the release bundle.
Optional

mappings

List of mappings that are applied to the artifact paths after distribution of the release bundle.

  • name - The friendly name of the mapping entry.
  • input - Regex match string for artifact paths.
  • output - Replacement for artifact paths matched by the "input" match string. Capture groups can be used as "$1".
Optional

Examples

pipelines.yml
resources:
  - name: Aql_ART_1
    type: Aql
    configuration:
      sourceArtifactory: s_artifactory
      query: items.find({"@build.name":{"$eq":"art"}})
      addedProperties:
        key1: value1
        key2: value2
      mappings:
        - name: mapping1
          input: IN
          output: test1
        - name: mapping2
          input: IN
          output: test2

pipelines:
  - name: pipelines_ART_1
    steps:
      - name: step_ART_1
        type: PowerShell
        configuration:
          nodePool: win_2019
          inputResources:
            - name: Aql_ART_1
              trigger: true
        execution:
          onExecute:
            - write-output "executing step..."
  • No labels
Copyright © 2021 JFrog Ltd.