Commit 363b961a authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

feat: support extra opts to install project deps

parent 088dce0f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ The Node.js template uses some global configuration used throughout all jobs.
| `NODE_CONFIG_REGISTRY` | npm [registry](https://docs.npmjs.com/cli/v8/using-npm/registry)                                 | _none_            |
| `NODE_PROJECT_DIR`     | Node project root directory                                                                      | `.`               |
| `NODE_SOURCE_DIR`      | Sources directory                                                                                | `src`             |
| `NODE_INSTALL_EXTRA_OPTS`| Extra options to install project dependencies (either [`npm ci`](https://docs.npmjs.com/cli/ci.html/) or [`yarn install`](https://yarnpkg.com/cli/install)) | _none_ |

## Jobs

+5 −0
Original line number Diff line number Diff line
@@ -50,6 +50,11 @@
      "description": "npm [test](https://docs.npmjs.com/cli/v8/commands/npm-test) arguments - yarn [test](https://classic.yarnpkg.com/en/docs/cli/test) arguments",
      "default": "test -- --coverage",
      "advanced": true
    },
    {
      "name": "NODE_INSTALL_EXTRA_OPTS",
      "description": "Extra options to install project dependencies (either [`npm ci`](https://docs.npmjs.com/cli/ci.html/) or [`yarn install`](https://yarnpkg.com/cli/install))",
      "advanced": true
    }
  ],
  "features": [
+2 −2
Original line number Diff line number Diff line
@@ -302,10 +302,10 @@ stages:
    - |
      case "$NODE_MANAGER" in
      npm)
        npm ci --prefer-offline
        npm ci --prefer-offline $NODE_INSTALL_EXTRA_OPTS
        ;;
      yarn)
        yarn install --immutable --immutable-cache --check-cache
        yarn install --immutable --immutable-cache --check-cache $NODE_INSTALL_EXTRA_OPTS
      ;;
      esac