Skip to content
Snippets Groups Projects
Commit e97d77d5 authored by Laurent CHASTEL's avatar Laurent CHASTEL Committed by Pierre Smeyers
Browse files

fix(build): fix NODE_BUILD_DISABLED param

parent b19c63df
Branches
Tags
No related merge requests found
...@@ -113,7 +113,7 @@ This job is bound to the `build` stage, and uses the following variables: ...@@ -113,7 +113,7 @@ This job is bound to the `build` stage, and uses the following variables:
| Input / Variable | Description | Default value | | Input / Variable | Description | Default value |
|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------| |-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
| `NODE_BUILD_DISABLED` | Set to `true` to disable build | _none_ (enabled) | | `build-disabled` / `NODE_BUILD_DISABLED` | Set to `true` to disable build | _none_ (enabled) |
| `build-dir` / `NODE_BUILD_DIR` | Variable to define build directory | `dist` | | `build-dir` / `NODE_BUILD_DIR` | Variable to define build directory | `dist` |
| `build-args` / `NODE_BUILD_ARGS` | npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments <br/> yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments <br/> pnpm [run script](https://pnpm.io/cli/run) arguments <br/>⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option. | `run build --prod` | | `build-args` / `NODE_BUILD_ARGS` | npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments <br/> yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments <br/> pnpm [run script](https://pnpm.io/cli/run) arguments <br/>⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option. | `run build --prod` |
| `test-args` / `NODE_TEST_ARGS` | npm [test](https://docs.npmjs.com/cli/v8/commands/npm-test) arguments <br/> yarn [test](https://classic.yarnpkg.com/en/docs/cli/test) arguments <br/> pnpm [test](https://pnpm.io/cli/test) arguments | `test -- --coverage` | | `test-args` / `NODE_TEST_ARGS` | npm [test](https://docs.npmjs.com/cli/v8/commands/npm-test) arguments <br/> yarn [test](https://classic.yarnpkg.com/en/docs/cli/test) arguments <br/> pnpm [test](https://pnpm.io/cli/test) arguments | `test -- --coverage` |
......
...@@ -42,6 +42,13 @@ ...@@ -42,6 +42,13 @@
"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`)", "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`)",
"advanced": true "advanced": true
}, },
{
"name": "NODE_BUILD_DISABLED",
"description": "Set to true to disable build",
"default": "false",
"type": "boolean",
"advanced": true
},
{ {
"name": "NODE_BUILD_ARGS", "name": "NODE_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\n\n⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option", "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\n\n⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option",
......
...@@ -39,6 +39,10 @@ spec: ...@@ -39,6 +39,10 @@ spec:
config-scoped-registries: 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`) 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: '' default: ''
build-disabled:
description: Set to true to disable build
type: boolean
default: false
build-args: build-args:
description: |- 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 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
...@@ -179,6 +183,7 @@ variables: ...@@ -179,6 +183,7 @@ variables:
NODE_LINT_ENABLED: $[[ inputs.lint-enabled ]] NODE_LINT_ENABLED: $[[ inputs.lint-enabled ]]
NODE_LINT_ARGS: $[[ inputs.lint-args ]] NODE_LINT_ARGS: $[[ inputs.lint-args ]]
# Node build # Node build
NODE_BUILD_DISABLED: $[[ inputs.build-disabled ]]
NODE_BUILD_ARGS: $[[ inputs.build-args ]] NODE_BUILD_ARGS: $[[ inputs.build-args ]]
# Node test # Node test
NODE_TEST_ARGS: $[[ inputs.test-args ]] NODE_TEST_ARGS: $[[ inputs.test-args ]]
...@@ -674,7 +679,8 @@ node-build: ...@@ -674,7 +679,8 @@ node-build:
expire_in: 1 day expire_in: 1 day
rules: rules:
# always if $NODE_BUILD_DISABLED not set # always if $NODE_BUILD_DISABLED not set
- if: '$NODE_BUILD_DISABLED != "true"' - if: '$NODE_BUILD_DISABLED == "true"'
when: never
- !reference [.test-policy, rules] - !reference [.test-policy, rules]
node-lint: node-lint:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment