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

Search





Overview

PropertyBag resource is used to pass information from one pipeline to another and provide environment variables to a step in the format of a resource.


A PropertyBag resource can have any string as property, which is then available as environment variables when the key is an input to a step. When it is an output, steps can change the values of properties or add new ones.

Page Contents


YAML Schema

resources:
  - name: 		<string>
    type: 		PropertyBag
    configuration:
      <string>: <string>
      <string>: <string>

Tags

name 

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

type 

Must be PropertyBag for this resource type.

configuration

Specifies all configuration selections for the resource.

Tag

Description

Required/Optional
<string> A property for the PropertyBag resource. The tag should be a valid variable name (Bash or PowerShell) for the steps where it is to be an input or output and the value a string. At least one is required, multiple properties are allowed.Required

Environment Variables

Whenever PropertyBag is used in a step, a set of environment variables is automatically made available that you can use in your step.

Environment Variable

Description

res_<resource_name>_<property>
Each property in the PropertyBag resource will be available as an environment variable in this format.
<property>
If a PropertyBag resource is in inputResources, the properties will also be exported as environment variables with the tag as the variable name.

Examples

The Pipelines DSL for this example is available in this repository in the JFrog GitHub account.

resources:
  - name: propertyBag_1
    type: PropertyBag
    configuration:
      property1: "jfrog"
      property2: "pipelines"

pipelines:
  - name: pipeline_PropertyBag_1
    steps:
      - name: step_propertyBag_1
        type: PowerShell
        configuration:
          nodePool: win_2019
          inputResources:
            - name: propertyBag_1
        execution:
          onExecute:
            - write-output "onExecute"
            - get-variable -name property1
            - get-variable -name property2
          onSuccess:
            - write-output "onSuccess"
  • No labels
Copyright © 2021 JFrog Ltd.