diff --git a/README.md b/README.md index f3b9c07bcfa697aab7d3660960430853fe98cda6..f010ffda7ab5ced391eb21d6f1ec1312c0777d55 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ The Angular template uses some global configuration used throughout all jobs. | `NPM_CONFIG_REGISTRY` | NPM [registry](https://docs.npmjs.com/configuring-your-registry-settings-as-an-npm-enterprise-user) | _none_ (defaults to `https://registry.npmjs.org`) | | `NPM_CONFIG_SCOPED_REGISTRIES` | 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`) | _none_ | | `NG_WORKSPACE_DIR` | Angular workspace directory | `.` | +| `NG_INSTALL_EXTRA_OPTS`| Extra options to install project dependencies (with [`npm ci`](https://docs.npmjs.com/cli/ci.html/)) | _none_ | ## Jobs diff --git a/kicker.json b/kicker.json index 5e5b625c0a8e5bc5baaf853f7864b36f46415cd4..5bf4d4a1687b91ded7c0bb5b56f1a0f048ee3cf9 100644 --- a/kicker.json +++ b/kicker.json @@ -26,6 +26,11 @@ "default": ".", "advanced": true }, + { + "name": "NG_INSTALL_EXTRA_OPTS", + "description": "Extra options to install project dependencies (with [`npm ci`](https://docs.npmjs.com/cli/ci.html/))", + "advanced": true + }, { "name": "NG_BUILD_ARGS", "description": "Angular [ng build](https://angular.io/cli/build) arguments", diff --git a/templates/gitlab-ci-angular.yml b/templates/gitlab-ci-angular.yml index d0be761b65c937978f48d957cd47c79eb024473b..3964a9e224b2b1b92f46b43869026652c2701648 100644 --- a/templates/gitlab-ci-angular.yml +++ b/templates/gitlab-ci-angular.yml @@ -441,7 +441,7 @@ stages: done fi - configure_gitlab_instance_level_npm_registry_auth - - npm ci --cache .npm --prefer-offline + - npm ci --cache .npm --prefer-offline $NG_INSTALL_EXTRA_OPTS ############################################################################################### # check stage: # @@ -530,7 +530,7 @@ ng-publish: - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - configure_gitlab_instance_level_npm_registry_auth - configure_npm_publish_registry_auth - - npm ci --cache .npm --prefer-offline + - npm ci --cache .npm --prefer-offline $NG_INSTALL_EXTRA_OPTS script: - npm_publish rules: