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 | Default |
|---|---|---|---|
$LOG_LEVEL | Define the log level for the application. | stringenum("panic", "fatal", "warn", "info", "debug", "trace") | "info" |
$ENV_FILE | Environment files to inject. | string[] |
pipe-node loginLogin to the given NPM registries.
pipe-node login [FLAGS]
Login
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NPM_LOGIN | NPM registries to login. | stringformat(json([]struct{ username: string, token: string, registry?: string, useHttps?: bool })) | |
$NPM_NPMRC_FILE | .npmrc file to use. | string[] | ".npmrc" |
$NPM_NPMRC | Direct contents of .npmrc file. | string |
Package Manager
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_PACKAGE_MANAGER | Preferred package manager for nodejs. | stringformat(enum("npm", "yarn", "pnpm")) | "pnpm" |
pipe-node installInstall node.js dependencies with the given package manager.
pipe-node install [FLAGS]
Install
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_INSTALL_CWD | Working directory for the install operation. | string | "." |
$NODE_INSTALL_USE_LOCK_FILE | Use the lockfile while installing the packages. | bool | true |
$NODE_INSTALL_ARGS | Arguments to append to the install command. | string | |
$NODE_INSTALL_CACHE | Enable caching for the package manager. | bool | true |
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NPM_LOGIN | NPM registries to login. | stringformat(json([]struct{ username: string, token: string, registry?: string, useHttps?: bool })) | |
$NPM_NPMRC_FILE | .npmrc file to use. | string[] | ".npmrc" |
$NPM_NPMRC | Direct contents of .npmrc file. | string |
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_PACKAGE_MANAGER | Preferred package manager for nodejs. | stringformat(enum("npm", "yarn", "pnpm")) | "pnpm" |
pipe-node addInstall node packages with the given package manager.
pipe-node add [FLAGS]
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_PACKAGE_MANAGER | Preferred package manager for nodejs. | stringformat(enum("npm", "yarn", "pnpm")) | "pnpm" |
Packages
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_ADD_PACKAGES* | Install node packages before performing operations. | string[] | |
$NODE_ADD_GLOBAL | Install node packages globally. | bool | true |
$NODE_ADD_SCRIPT_ARGS | Script arguments to append to the install command. | string | |
$NODE_ADD_CWD | Working directory for the add operation. | string | "." |
* required
pipe-node buildpipe-node build [FLAGS]
Build
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_BUILD_SCRIPT | package.json script for the build operation. | stringformat(Template(struct{ Environment: string, EnvVars: map[string]string })) | "build" |
$NODE_BUILD_SCRIPT_ARGS | package.json script arguments for the build operation. | stringformat(Template(struct{ Environment: string, EnvVars: map[string]string })) | |
$NODE_BUILD_CWD | Working directory for the build operation. | string | "." |
Environment
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$ENVIRONMENT_ENABLE | Enable environment injection. | bool | 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. | stringformat(json([]struct{ match: RegExp, environment: string })) | "[\n { \"match\": \"^tags/v?\\\\d+.\\\\d+.\\\\d+$\", \"environment\": \"production\" },\n { \"match\": \"^tags/v?\\\\d+.\\\\d+.\\\\d+-.*\\\\.\\\\d+$\", \"environment\": \"stage\" },\n { \"match\" :\"^heads/main$\", \"environment\": \"develop\" },\n { \"match\": \"^heads/master$\", \"environment\": \"develop\" }\n]" |
$ENVIRONMENT_FAIL_ON_NO_REFERENCE | Fail on missing environment references. | bool | true |
$ENVIRONMENT_STRICT | Fail when no environment is selected. | bool | true |
GIT
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$CI_COMMIT_REF_NAME$BITBUCKET_BRANCH | Source control branch. | string | |
$CI_COMMIT_TAG$BITBUCKET_TAG | Source control tag. | string |
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_PACKAGE_MANAGER | Preferred package manager for nodejs. | stringformat(enum("npm", "yarn", "pnpm")) | "pnpm" |
pipe-node runpipe-node run [FLAGS] Arguments appended to the script.
| Argument | Usage | Type | Values |
|---|---|---|---|
arg | Arguments appended to the script. | string[] | 0..* |
Command
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_RUN_SCRIPT$NODE_COMMAND_SCRIPT | package.json script for the given command operation. | stringformat(Template(struct{ Environment: string, EnvVars: map[string]string })) | |
$NODE_RUN_CWD$NODE_COMMAND_CWD | Working directory for the given command operation. | string | "." |
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$ENVIRONMENT_ENABLE | Enable environment injection. | bool | 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. | stringformat(json([]struct{ match: RegExp, environment: string })) | "[\n { \"match\": \"^tags/v?\\\\d+.\\\\d+.\\\\d+$\", \"environment\": \"production\" },\n { \"match\": \"^tags/v?\\\\d+.\\\\d+.\\\\d+-.*\\\\.\\\\d+$\", \"environment\": \"stage\" },\n { \"match\" :\"^heads/main$\", \"environment\": \"develop\" },\n { \"match\": \"^heads/master$\", \"environment\": \"develop\" }\n]" |
$ENVIRONMENT_FAIL_ON_NO_REFERENCE | Fail on missing environment references. | bool | true |
$ENVIRONMENT_STRICT | Fail when no environment is selected. | bool | true |
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$CI_COMMIT_REF_NAME$BITBUCKET_BRANCH | Source control branch. | string | |
$CI_COMMIT_TAG$BITBUCKET_TAG | Source control tag. | string |
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$NODE_PACKAGE_MANAGER | Preferred package manager for nodejs. | stringformat(enum("npm", "yarn", "pnpm")) | "pnpm" |
Content type
Image
Digest
sha256:9f371fac4…
Size
394 MB
Last updated
2 days ago
docker pull cenk1cenk2/pipe-node:22