STEP

Run NPX command

This NPX step allows you to run a command in the context of a git resource

Specification

command

Required

string
Executes command by installing latest package from the npm registry.
packageFolder
Optional
string
Location of the folder in which to run the npx command.
nodeVersion
Optional
string
Optional Node.js version. If unspecified, the latest LTS version will be used (as defined by the Debian-based node:lts image). The version string can be any version installable by nvm. To use an .nvmrc file in your repository to specify a Node.js version, you must specify a nodeVersion of "auto".
flags
Optional
object
Optional flags passed to npx.
flags.package
Optional
string
Can be used when the binary name does not match the package name or for packages with multiple binaries if you want to call one of the other executables.
commandFlags
Optional
object
Optional flags passed to the command.
git
Optional
object
A map of git configuration. If you're using HTTPS, only name and repository are required.
git.ssh_key

Required

string
The SSH key to use when cloning the git repository. You can pass the key to Relay as a secret. See the example below.
git.known_hosts
Optional
string
SSH known hosts file. Use a Relay secret to pass the contents of the file into the workflow as a base64-encoded string. See the example below.
git.name

Required

string
A directory name for the git clone.
git.branch
Optional
string
The Git branch to clone.
git.repository

Required

string
The git repository URL.
npm
Optional
object
NPM credentials
npm.token
Optional
string
Optional NPM token (created via `npm token create`) for things like publishing.

Integrations in this step

Install the Relay CLI

Relay CLI is an essential companion for authoring and managing workflows. You can install it with a package manager or download it.
brew install puppetlabs/puppet/relay
Learn more about setting up Relay.

How to contribute

We’re excited to see and share in our community’s creation. Take a look at our community overview to learn how to begin contributing to Relay.