Skip to content

Commit

Permalink
Update Npm installs to use local feed (#1146)
Browse files Browse the repository at this point in the history
* add npm authenticate

* typo

* remove extra authenticate step

* add npmrc file

* update registry
  • Loading branch information
MaddyDev authored Nov 18, 2024
1 parent 8f9cba9 commit 0c3ed47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
registry=https://registry.npmjs.org

always-auth=true
14 changes: 10 additions & 4 deletions builds/azure-pipelines/template-steps-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ steps:
packageType: sdk
version: '3.1.x'

- script: npm install -g azure-functions-core-tools
- task: npmAuthenticate@0
displayName: 'npm Authenticate for project'
inputs:
workingFile: $(Build.SourcesDirectory)/.npmrc

- script: npm install azure-functions-core-tools --global --globalconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
displayName: 'Install Azure Functions Core Tools'

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

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


- script: |
npm install
npm install --userconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
npm run lint
workingDirectory: $(Build.SourcesDirectory)/samples/samples-js
displayName: Lint samples-js

- script: |
npm install
npm install --userconfig $(Build.SourcesDirectory)/.npmrc --loglevel verbose
npm run lint
workingDirectory: $(Build.SourcesDirectory)/test/Integration/test-js
displayName: Lint test-js
Expand Down

0 comments on commit 0c3ed47

Please sign in to comment.