Create a new gitlab-ci.yml template to help developers publish packages to the GitLab NPM Registry
Problem to solve
Javascript developers using GitLab's NPM Registry need an easy way for building and deploying packages, from the CI/CD builds. We currently have a template for integrating with node.js, but it does not take advantage of the NPM registry for uploading and sharing packages.
Proposal
Modify the exiting node.js template of `.gitlab-ci.yml' that will allow users to integrate with the NPM registry as part of their CI/CD pipelines. The template will provide the structure and order of each build and allow for uploading of packages to the NPM Registry.
As with other gitlab-ci.yml templates, we should set defaults for script, stage and any expected actions.
Working Example
Permissions and Security
- Developers, Maintainers and Administrators can all pull and publish packages to the GitLab NPM Registry. This is in line with our existing permissions.
- We must warn users not to include secrets in publicly available projects.
Documentation
Testing
- Test with multiple configurations and options
- Ensure permissions are working as expected
What does success look like, and how can we measure that?
Success looks like a user that is setting up NPM for the first time is able to get it up and running and configured with CI/CD quickly and easily. We can measure the number of new issues for NPM configuration and the time to resolution.
What is the type of buyer?
Currently the NPM Registry is only available in the Enterprise Edition, so this feature is targeted towards Premium and Ultimate customers.
Links / references
Other Potential Strategies
JFrog has a web form which allows administrators to define certain values and automatically set defaults within the settings and pom files. We could do something similar, but it goes against GitLab design principles.