Pipe for installing node.js dependencies and building node.js applications on CI/CD.
pipe-node [GLOBAL FLAGS] [COMMAND] [FLAGS]
CLI
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$LOG_LEVEL |
Define the log level for the application. | String enum("panic", "fatal", "warn", "info", "debug", "trace") |
false |
info |
$ENV_FILE |
Environment files to inject. | StringSlice |
false |
Login to the given NPM registries.
Login
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NPM_LOGIN |
NPM registries to login. | String json([]struct { username: string, password: string, registry?: string, useHttps?: bool }) |
false |
|
$NPM_NPMRC_FILE |
.npmrc file to use. | StringSlice |
false |
".npmrc" |
$NPM_NPMRC |
Direct contents of .npmrc file. | String |
false |
Package Manager
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_PACKAGE_MANAGER |
Preferred Package manager for nodejs. | String enum("npm", "yarn", "pnpm") |
false |
pnpm |
Install node.js dependencies with the given package manager.
Install
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_INSTALL_CWD |
Install CWD for the package manager. | String |
false |
. |
$NODE_INSTALL_USE_LOCK_FILE |
Use the lockfile while installing the packages. | Bool |
false |
true |
$NODE_INSTALL_ARGS |
Arguments to append to install command. | String |
false |
|
$NODE_INSTALL_CACHE_ENABLE |
Enable caching for the package manager. | Bool |
false |
true |
Login
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NPM_LOGIN |
NPM registries to login. | String json([]struct { username: string, password: string, registry?: string, useHttps?: bool }) |
false |
|
$NPM_NPMRC_FILE |
.npmrc file to use. | StringSlice |
false |
".npmrc" |
$NPM_NPMRC |
Direct contents of .npmrc file. | String |
false |
Package Manager
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_PACKAGE_MANAGER |
Preferred Package manager for nodejs. | String enum("npm", "yarn", "pnpm") |
false |
pnpm |
Build
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_BUILD_SCRIPT |
package.json script for building operation. | String Template(struct { Environment: string, EnvVars: map[string]string }) |
false |
build |
$NODE_BUILD_SCRIPT_ARGS |
package.json script arguments for building operation. | String Template(struct { Environment: string, EnvVars: map[string]string }) |
false |
|
$NODE_BUILD_CWD |
Working directory for build operation. | String |
false |
. |
Environment
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$ENVIRONMENT_ENABLE |
Enable environment injection. | Bool |
false |
false |
$ENVIRONMENT_CONDITIONS |
Regex pattern to select an environment. Use either "heads/" for narrowing the search to branches or "tags/" for narrowing the search to tags. |
String json([]struct{ match: RegExp, environment: string }) |
false |
[ { "match": "^tags/v?\d+.\d+.\d+$", "environment": "production" }, { "match": "^tags/v?\d+.\d+.\d+-.*\.\d+$", "environment": "stage" }, { "match" :"^heads/main$", "environment": "develop" }, { "match": "^heads/master$", "environment": "develop" } ] |
$ENVIRONMENT_FAIL_ON_NO_REFERENCE |
Fail on missing environment references. | Bool |
false |
true |
$ENVIRONMENT_STRICT |
Fail on no environment selected. | Bool |
false |
true |
GIT
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$CI_COMMIT_REF_NAME $BITBUCKET_BRANCH |
Source control branch. | String |
false |
|
$CI_COMMIT_TAG $BITBUCKET_TAG |
Source control tag. | String |
false |
Package Manager
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_PACKAGE_MANAGER |
Preferred Package manager for nodejs. | String enum("npm", "yarn", "pnpm") |
false |
pnpm |
Command
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_COMMAND_SCRIPT |
package.json script for given command operation. | String Template(struct { Environment: string, EnvVars: map[string]string }) |
false |
|
$NODE_COMMAND_CWD |
Working directory for the given command operation. | String |
false |
. |
Environment
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$ENVIRONMENT_ENABLE |
Enable environment injection. | Bool |
false |
false |
$ENVIRONMENT_CONDITIONS |
Regex pattern to select an environment. Use either "heads/" for narrowing the search to branches or "tags/" for narrowing the search to tags. |
String json([]struct{ match: RegExp, environment: string }) |
false |
[ { "match": "^tags/v?\d+.\d+.\d+$", "environment": "production" }, { "match": "^tags/v?\d+.\d+.\d+-.*\.\d+$", "environment": "stage" }, { "match" :"^heads/main$", "environment": "develop" }, { "match": "^heads/master$", "environment": "develop" } ] |
$ENVIRONMENT_FAIL_ON_NO_REFERENCE |
Fail on missing environment references. | Bool |
false |
true |
$ENVIRONMENT_STRICT |
Fail on no environment selected. | Bool |
false |
true |
GIT
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$CI_COMMIT_REF_NAME $BITBUCKET_BRANCH |
Source control branch. | String |
false |
|
$CI_COMMIT_TAG $BITBUCKET_TAG |
Source control tag. | String |
false |
Package Manager
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NODE_PACKAGE_MANAGER |
Preferred Package manager for nodejs. | String enum("npm", "yarn", "pnpm") |
false |
pnpm |