File contents resolver

The file contents resolver reads a file and uses the file contents as a parameter value.

Properties

Here are the properties of the file contents resolver:

Key Required Type Description
resolver yes string Resolver name, this must be file-contents.
file yes string Path to file. Can be an absolute path or a path relative to the project directory.
confidential no boolean Conceal the resolved parameter value from logs, defaults to false.
immutable no boolean Mark the parameter as immutable, defaults to false.

Examples

Use contents of /tmp/commit.txt file as parameter value:

parameters:
  CommitHash:
    resolver: file-contents
    file: /tmp/commit.txt

Use a relative file path:

parameters:
  Code:
    resolver: file-contents
    file: code.txt
ON THIS PAGE