Javascript Roles

fetch-javascript-content-tarball

Fetch a Javascript content tarball back to be published.

A content tarball is one that contains built javascript/css artifacts, such as but not limited to those produced by the webpack ArchivePlugin.

Role Variables

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to work in.

create_tarball_directory

Create a tarball with the contents of create_tarball_directory (relative to zuul_work_dir).

fetch-javascript-output

Collect outputs from a javascript build

Role Variables

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to work in

javascript_content_dir
Default: dist

Directory, relative to zuul_work_dir, in which javascript output content is to be found.

Whether to copy the data pointed to by symlinks in the built content, or to copy them as symbolic links.

fetch-javascript-tarball

Fetch a Javascript tarball back to be published.

Role Variables

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to run npm in.

install-javascript-packages

Install javascript dependencies needed for a project

Role Variables

zuul_work_dir
Default: {{ zuul.project.src_dir }}

The directory to work in.

install-nodejs

Install NodeJS from nodesource

Role Variables

node_version
Default: 6
install-yarn

Install yarn from yarnpkg repos

Role Variables

zuul_work_dir
Default: {{ zuul.project.src_dir }}

The directory to work in.

yarn_lock_file_path
Default: {{ zuul_work_dir }}/yarn.lock

Path to yarn.lock file used by a project.

nodejs-test-dependencies

Install test dependencies for Node

npm

Run npm command in a source directory. Assumes the appropriate version of npm has been installed.

Role Variables

npm_command

Command to run. If it’s a standard npm lifecycle command, it will be run as npm {{ npm_command }}. Otherwise it will be run as npm run {{ npm_command }}.

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to run npm in.

upload-npm

Upload javascript packages to npm

Role Variables

npm_credentials

Complex argument which contains the information about the npm server as well as the authentication information needed. It is expected that this argument comes from a Secret. This role expects to be run on the executor.

npm_credentials.username

Username to use to log in to npm.

npm_credentials.password

Password to use to log in to npm.

npm_credentials.email

Email associated with the npm account.

npm_credentials.author_name

npm author name.

npm_credentials.author_url

npm author url.

npm_credentials.author_email

npm author email.

npm_credentials.registry_url
Default: //registry.npmjs.org

URL of npm registry server.

yarn

Run yarn command in a source directory. Assumes the appropriate version of yarn has been installed.

Role Variables

yarn_command

Command to run. If it’s a standard lifecycle command, it will be run as yarn {{ yarn_command }}. Otherwise it will be run as yarn run {{ yarn_command }}.

zuul_work_dir
Default: {{ zuul.project.src_dir }}

Directory to run yarn in.