Sign inSign up

cenk1cenk2/pipe-node

By cenk1cenk2

Updated about 1 hour ago

Node.JS operations for pipelines.

Image
0

10K+

cenk1cenk2/pipe-node repository overview

pipe-node

Pipe for installing node.js dependencies and building node.js applications on CI/CD.

pipe-node [GLOBAL FLAGS] [COMMAND] [FLAGS]

Global Flags

CLI

Flag / EnvironmentDescriptionTypeRequiredDefault
$LOG_LEVELDefine the log level for the application.string
enum("panic", "fatal", "warn", "info", "debug", "trace")
falseinfo
$ENV_FILEEnvironment files to inject.string[]false[]

Commands

pipe-node login

Login to the given NPM registries.

Flags

Login

Flag / EnvironmentDescriptionTypeRequiredDefault
$NPM_LOGINNPM registries to login.string
json([]struct { username: string, password: string, registry?: string, useHttps?: bool })
false
$NPM_NPMRC_FILE.npmrc file to use.string[]false[.npmrc]
$NPM_NPMRCDirect contents of .npmrc file.stringfalse

Package Manager

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_PACKAGE_MANAGERPreferred Package manager for nodejs.string
enum("npm", "yarn", "pnpm")
falsepnpm
pipe-node install

Install node.js dependencies with the given package manager.

Flags

Install

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_INSTALL_CWDInstall CWD for the package manager.stringfalse.
$NODE_INSTALL_USE_LOCK_FILEUse the lockfile while installing the packages.boolfalsetrue
$NODE_INSTALL_ARGSArguments to append to install command.stringfalse
$NODE_INSTALL_CACHE_ENABLEEnable caching for the package manager.boolfalsetrue

Login

Flag / EnvironmentDescriptionTypeRequiredDefault
$NPM_LOGINNPM registries to login.string
json([]struct { username: string, password: string, registry?: string, useHttps?: bool })
false
$NPM_NPMRC_FILE.npmrc file to use.string[]false[.npmrc]
$NPM_NPMRCDirect contents of .npmrc file.stringfalse

Package Manager

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_PACKAGE_MANAGERPreferred Package manager for nodejs.string
enum("npm", "yarn", "pnpm")
falsepnpm
pipe-node build
Flags

Build

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_BUILD_SCRIPTpackage.json script for building operation.string
Template(struct { Environment: string, EnvVars: map[string]string })
falsebuild
$NODE_BUILD_SCRIPT_ARGSpackage.json script arguments for building operation.string
Template(struct { Environment: string, EnvVars: map[string]string })
false
$NODE_BUILD_CWDWorking directory for build operation.stringfalse.

Environment

Flag / EnvironmentDescriptionTypeRequiredDefault
$ENVIRONMENT_ENABLEEnable environment injection.boolfalsefalse
$ENVIRONMENT_CONDITIONSRegex 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_REFERENCEFail on missing environment references.boolfalsetrue
$ENVIRONMENT_STRICTFail on no environment selected.boolfalsetrue

GIT

Flag / EnvironmentDescriptionTypeRequiredDefault
$CI_COMMIT_REF_NAME
$BITBUCKET_BRANCH
Source control branch.stringfalse
$CI_COMMIT_TAG
$BITBUCKET_TAG
Source control tag.stringfalse

Package Manager

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_PACKAGE_MANAGERPreferred Package manager for nodejs.string
enum("npm", "yarn", "pnpm")
falsepnpm
pipe-node run
Flags

Command

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_COMMAND_SCRIPTpackage.json script for given command operation.string
Template(struct { Environment: string, EnvVars: map[string]string })
false
$NODE_COMMAND_CWDWorking directory for the given command operation.stringfalse.

Environment

Flag / EnvironmentDescriptionTypeRequiredDefault
$ENVIRONMENT_ENABLEEnable environment injection.boolfalsefalse
$ENVIRONMENT_CONDITIONSRegex 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_REFERENCEFail on missing environment references.boolfalsetrue
$ENVIRONMENT_STRICTFail on no environment selected.boolfalsetrue

GIT

Flag / EnvironmentDescriptionTypeRequiredDefault
$CI_COMMIT_REF_NAME
$BITBUCKET_BRANCH
Source control branch.stringfalse
$CI_COMMIT_TAG
$BITBUCKET_TAG
Source control tag.stringfalse

Package Manager

Flag / EnvironmentDescriptionTypeRequiredDefault
$NODE_PACKAGE_MANAGERPreferred Package manager for nodejs.string
enum("npm", "yarn", "pnpm")
falsepnpm

Tag summary

Content type

Image

Digest

sha256:498453617

Size

428.4 MB

Last updated

about 1 hour ago

docker pull cenk1cenk2/pipe-node:26