Commit c505e525 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'disable-build' into 'master'

Disable build correction

Closes #37

See merge request to-be-continuous/node!71
parents b19c63df e97d77d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ This job is bound to the `build` stage, and uses the following variables:

| 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-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`  |
+7 −0
Original line number Diff line number Diff line
@@ -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`)",
      "advanced": true
    },
    {
      "name": "NODE_BUILD_DISABLED",
      "description": "Set to true to disable build",
      "default": "false",
      "type": "boolean",
      "advanced": true
    },
    {
      "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",
+7 −1
Original line number Diff line number Diff line
@@ -39,6 +39,10 @@ spec:
    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
@@ -179,6 +183,7 @@ variables:
  NODE_LINT_ENABLED: $[[ inputs.lint-enabled ]]
  NODE_LINT_ARGS: $[[ inputs.lint-args ]]
  # Node build
  NODE_BUILD_DISABLED: $[[ inputs.build-disabled ]]
  NODE_BUILD_ARGS: $[[ inputs.build-args ]]
  # Node test
  NODE_TEST_ARGS: $[[ inputs.test-args ]]
@@ -674,7 +679,8 @@ node-build:
    expire_in: 1 day
  rules:
    # always if $NODE_BUILD_DISABLED not set
    - if: '$NODE_BUILD_DISABLED != "true"'
    - if: '$NODE_BUILD_DISABLED == "true"'
      when: never
    - !reference [.test-policy, rules]

node-lint: