Template Functions List

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

The pipeline templateDefinition.yml supports these helm chart style functions:

  • String Functions: trim, wrap, randAlpha, plural, and others.

    • String List Functions: splitList, sortAlpha, and others.

    Default Value for String Functions

    If you are using a string function (such as trunc or abbrev) that expects a value, then ensure that the template gives it a default value.

    Example: .Values.app | default "" | trunc 6

  • Integer Math Functions: add, max, mul, and others.

    • Integer Slice Functions: until, untilStep

  • Float Math Functions: addf, maxf, mulf, and others.

  • Date Functions: now, date, and others.

  • Defaults Functions: default, empty, coalesce, fromJson, toJson, toPrettyJson, toRawJson, ternary

  • Encoding Functions: b64enc, b64dec, and others.

  • Lists and List Functions: list, first, uniq, and others.

  • Dictionaries and Dict Functions: get, set, dict, hasKey, pluck, dig, deepCopy, and others.

  • Type Conversion Functions: atoi, int64, toString, and others.

  • Path and Filepath Functions: base, dir, ext, clean, isAbs, osBase, osDir, osExt, osClean, osIsAbs

  • Flow Control Functions: fail

  • Advanced Functions:

    • UUID Functions: uuidv4

    • Version Comparison Functions: semver, semverCompare

    • Reflection: typeOf, kindIs, typeIsLike, and others.

    • Cryptographic and Security Functions: derivePassword, sha256sum, genPrivateKey, and others.

    • Network: getHostByName

For more information about these functions, see Template Functions and Sprig Function Documentation. Sprig library v3.2.2 is supported.

Unsupported Functions

The following functions are not supported:

  • tpl

  • toToml

  • toYaml

  • fromYaml

  • fromYamlArray

  • toJson

  • fromJson

  • fromJsonArray

  • lookup

  • expandenv

  • env

Using Conditionals and Loops

You can enhance your templates further by using conditionals and loops. Pipelines templates supports all the conditionals, loops, and variables that work with Helm charts.