The following examples show how to configure an NpmBuild step. For more information about NpmBuild Pipeline steps, see NpmBuild.
Using Default Settings
An NpmBuild step using default locations and default commands.
This example requires GitHub Integration.
For more information about running this example, see Pipeline Example: Npm Build.
NpmBuild
# This config file is templatized so that it can be easily customized. Values can be provided with a values.yml file.
template: true # required for local templates
valuesFilePath: ./values.yml
resources:
- name: npm_repo_jfp_example
type: GitRepo
configuration:
# SCM integration where the repository is located
gitProvider: {{ .Values.myRepo.gitProvider }}
# Repository path, including org name/repo name
path: {{ .Values.myRepo.path }}
branches:
# Specifies which branches will trigger dependent steps
include: master
- name: npm_buildinfo_jfp_example
type: BuildInfo
configuration:
sourceArtifactory: demoArt
pipelines:
- name: npm_pipeline_jfp_example
steps:
- name: npm_build_step
type: NpmBuild
configuration:
repositoryName: npm-virtual # required, npm repository name on artifacctory
sourceLocation: . # required, location of package.json file
integrations:
- name: demoArt # required
inputResources:
- name: npm_repo_jfp_example # requiredUsing FileSpec Input
An NpmBuild step with a FileSpec input providing files for the build that are not in the GitRepo and resolverRepo specifying an Artifactory repository to use when resolving dependencies.
NpmBuild
pipelines:
- name: npmBuildPipeline
steps:
- name: npmBuildStep
type: NpmBuild
configuration:
sourceLocation: "source"
resolverRepo: remote-npm
inputResources:
- name: gitRepoResource
- name: fileSpecResource
integrations:
- name: artifactory_integration