Skip to content

Commit 0c3ed47

Browse files
authored
Update Npm installs to use local feed (#1146)
* add npm authenticate * typo * remove extra authenticate step * add npmrc file * update registry
1 parent 8f9cba9 commit 0c3ed47

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
registry=https://registry.npmjs.org
2+
3+
always-auth=true

builds/azure-pipelines/template-steps-build-test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ steps:
1919
packageType: sdk
2020
version: '3.1.x'
2121

22-
- script: npm install -g azure-functions-core-tools
22+
- task: npmAuthenticate@0
23+
displayName: 'npm Authenticate for project'
24+
inputs:
25+
workingFile: $(Build.SourcesDirectory)/.npmrc
26+
27+
- script: npm install azure-functions-core-tools --global --globalconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
2328
displayName: 'Install Azure Functions Core Tools'
2429

25-
- script: npm install -g azurite
30+
- script: npm install azurite --global --globalconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
2631
displayName: 'Install Azurite Local Storage Emulator'
2732

2833
# This step is necessary because npm installs to a non-traditional location on Windows hosted agents
@@ -60,14 +65,15 @@ steps:
6065
displayName: Set logging level
6166
condition: and(succeeded(), ne(variables['AFSQLEXT_TEST_LOGLEVEL'], ''))
6267

68+
6369
- script: |
64-
npm install
70+
npm install --userconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
6571
npm run lint
6672
workingDirectory: $(Build.SourcesDirectory)/samples/samples-js
6773
displayName: Lint samples-js
6874

6975
- script: |
70-
npm install
76+
npm install --userconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
7177
npm run lint
7278
workingDirectory: $(Build.SourcesDirectory)/test/Integration/test-js
7379
displayName: Lint test-js

0 commit comments

Comments
 (0)