Hi team,
We are currently using Jenkins to handle our builds because it has access to the Nexus private registry via environment variables. We also use Netlify for hosting PR previews.
However, when a PR is raised, Netlify’s default build fails since it doesn’t have access to the Nexus token required to install private packages. To resolve this, we are planning to:
- Let Jenkins handle the build process using its environment variables and .npmrc.
- Then use Netlify CLI from Jenkins to deploy the built app as a preview.
- We have a monorepo with 4 apps, and we want to deploy a preview only for the app that has changed in the PR.
Questions:
-
Is it possible to deploy the Jenkins-built app to Netlify as a PR preview using the CLI?
-
Are there any restrictions or known issues when using Netlify CLI deployments in Jenkins pipelines?