diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..46e8008 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ +@azure:registry=https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/npm/registry/ diff --git a/azure-pipelines/templates/build.yml b/azure-pipelines/templates/build.yml index 2b8a464..bd862c2 100644 --- a/azure-pipelines/templates/build.yml +++ b/azure-pipelines/templates/build.yml @@ -14,6 +14,10 @@ jobs: inputs: versionSpec: 20.x displayName: 'Install Node.js' + - task: npmAuthenticate@0 + displayName: 'Authenticate to Central Feed Service' + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' - script: npm ci displayName: 'npm ci' - script: npm audit --production diff --git a/azure-pipelines/templates/npm-publish-steps.yml b/azure-pipelines/templates/npm-publish-steps.yml index 90bb948..10b0e11 100644 --- a/azure-pipelines/templates/npm-publish-steps.yml +++ b/azure-pipelines/templates/npm-publish-steps.yml @@ -9,6 +9,11 @@ steps: inputs: versionSpec: 18.x + - task: npmAuthenticate@0 + displayName: 'Authenticate to Central Feed Service' + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' + - script: npm ci displayName: 'npm ci' diff --git a/azure-pipelines/templates/test.yml b/azure-pipelines/templates/test.yml index 22f1476..a9a856f 100644 --- a/azure-pipelines/templates/test.yml +++ b/azure-pipelines/templates/test.yml @@ -17,6 +17,10 @@ jobs: inputs: versionSpec: $(NODE_VERSION) displayName: 'Install Node.js' + - task: npmAuthenticate@0 + displayName: 'Authenticate to Central Feed Service' + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' - script: npm ci displayName: 'npm ci' - script: npm run build