Select Git revision
gitlab-ci-node.yml
-
Bertrand Goareguer authoredBertrand Goareguer authored
gitlab-ci-node.yml 31.76 KiB
# =========================================================================================
# Copyright (C) 2021 Orange & contributors
#
# This program is free software; you can redistribute it and/or modify it under the terms
# of the GNU Lesser General Public License as published by the Free Software Foundation;
# either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License along with this
# program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA.
# =========================================================================================
# default workflow rules: Merge Request pipelines
spec:
inputs:
config-registry:
description: 'npm [registry](https://docs.npmjs.com/cli/v8/using-npm/registry) '
default: ''
image:
description: The Docker image used to run Node.js - **set the version required by your project**
default: registry.hub.docker.com/library/node:lts-alpine
manager:
description: The package manager used by your project (npm, yarn or pnpm) - **if undefined, automatic detection**
options:
- auto
- npm
- yarn
- pnpm
default: auto
project-dir:
description: Node project root directory
default: .
source-dir:
description: Sources directory
default: src
config-scoped-registries:
description: Space separated list of NPM [scoped registries](https://docs.npmjs.com/cli/v8/using-npm/scope#associating-a-scope-with-a-registry) (formatted as `@somescope:https://some.npm.registry/some/repo @anotherscope:https://another.npm.registry/another/repo`)
default: ''
build-disabled:
description: Set to true to disable build
type: boolean
default: false
build-args:
description: |-
npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments - yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments - pnpm [run script](https://pnpm.io/cli/run) arguments
⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option
default: run build --prod
build-dir:
description: Variable to define build directory
default: dist
test-args:
description: npm [test](https://docs.npmjs.com/cli/v8/commands/npm-test) arguments - yarn [test](https://classic.yarnpkg.com/en/docs/cli/test) arguments - pnpm [test](https://pnpm.io/cli/test) arguments
default: test -- --coverage
install-extra-opts:
description: Extra options to install project dependencies (either [`npm ci`](https://docs.npmjs.com/cli/ci.html/), [`yarn install`](https://yarnpkg.com/cli/install) or [`pnpm install`](https://pnpm.io/cli/install))
default: ''
lint-enabled:
description: Enable node lint
type: boolean
default: false
lint-args:
description: npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments to execute the lint analysis - yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments to execute the lint analysis - pnpm [run script](https://pnpm.io/cli/run) arguments to execute the lint analysis
default: run lint
audit-disabled:
description: Disable node audit
type: boolean