Commit e43446a3 authored by Mathis Goichon's avatar Mathis Goichon
Browse files

fix(config_registry): rename var



Support of NODE_CONFIG_REGISTRY variable (prefixed with NODE_ as other template vars), with default value $NPM_CONFIG_REGISTRY

Signed-off-by: default avatarMathis Goichon <mathisgoichon@gmail.com>
parent 6d638688
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -22,10 +22,10 @@ include:
The Node.js template uses some global configuration used throughout all jobs.

| Name                   | description                                                                                      | default value     |
|--------------------|--------------------------------------------------------------------------------------------------|-------------------|
|------------------------|--------------------------------------------------------------------------------------------------|-------------------|
| `NODE_IMAGE`           | The Docker image used to run Node.js <br/>:warning: **set the version required by your project** | `node:lts-alpine` |
| `NODE_MANAGER`         | The package manager used by your project (npm or yarn)<br/>**If undefined, automatic detection** | _none_            |
| `CONFIG_REGISTRY`  | npm [registry](https://docs.npmjs.com/cli/v8/using-npm/registry)                                 | _none_            |
| `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`             |

+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
  "kind": "build",
  "variables": [
    {
      "name": "CONFIG_REGISTRY",
      "name": "NODE_CONFIG_REGISTRY",
      "description": "npm [registry](https://docs.npmjs.com/cli/v8/using-npm/registry)    ",
      "type": "url",
      "advanced": true
+2 −1
Original line number Diff line number Diff line
@@ -274,7 +274,8 @@ stages:
    - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
    - guess_node_manager_system
    - cd ${NODE_PROJECT_DIR}
    - if [[ "$CONFIG_REGISTRY" ]]; then $NODE_MANAGER config set registry $CONFIG_REGISTRY; fi
    - config_registry=${NODE_CONFIG_REGISTRY:-$NPM_CONFIG_REGISTRY}
    - if [[ "$config_registry" ]]; then $NODE_MANAGER config set registry $config_registry; fi
    - |
      case "$NODE_MANAGER" in
      npm)