Skip to main content

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:

KeyRequiredTypeDescription
resolveryesstringResolver name, this must be file-contents.
fileyesstringPath to file. Can be an absolute path or a path relative to the project directory.
confidentialnobooleanConceal the resolved parameter value from logs, defaults to false.
immutablenobooleanMark 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