Add serviceConnections parameter to npmAuthenticate task.

This commit is contained in:
Connie Yau 2025-12-04 11:11:17 -08:00 committed by azure-sdk
parent b5ae8c9d8a
commit 9a7cb46c10

View File

@ -6,6 +6,9 @@ parameters:
- name: CustomCondition - name: CustomCondition
type: string type: string
default: succeeded() default: succeeded()
- name: ServiceConnection
type: string
default: ''
steps: steps:
- pwsh: | - pwsh: |
@ -21,8 +24,10 @@ steps:
$content | Out-File '${{ parameters.npmrcPath }}' $content | Out-File '${{ parameters.npmrcPath }}'
displayName: 'Create .npmrc' displayName: 'Create .npmrc'
condition: ${{ parameters.CustomCondition }} condition: ${{ parameters.CustomCondition }}
- task: npmAuthenticate@0 - task: npmAuthenticate@0
displayName: Authenticate .npmrc displayName: Authenticate .npmrc
condition: ${{ parameters.CustomCondition }} condition: ${{ parameters.CustomCondition }}
inputs: inputs:
workingFile: ${{ parameters.npmrcPath }} workingFile: ${{ parameters.npmrcPath }}
azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}