Harsh Rohila
Harsh Rohila

Reputation: 460

Azure pipeline, npmAuthenticate task in custom docker container

I am trying to use npmAuthenticate task in azure pipeline which is running script in custom docker container

container:
  image: android_builder:37878
  endpoint: sc-acr

steps:
- task: npmAuthenticate@0
  inputs:
    workingFile: '.npmrc'
- script: |
    npm i

The azure private registry is in my organisation, but npm install is failing because of auth I haven't found a example of using this task in docker container in documentation, so not sure if this works in this way

Upvotes: 1

Views: 467

Answers (1)

Lucas Bazetto
Lucas Bazetto

Reputation: 647

the npm authenticate task is just for task runners. You can use the npm task itself, with your private registry as a custom feed

- task: Npm@1
  inputs:
    command: 'install'
    customRegistry: 'useFeed'
    customFeed: '<YOUR FEED ID>'

Upvotes: 1

Related Questions