Skip to content

Commit 8df6122

Browse files
chidozieononiwuazure-sdk
authored andcommitted
Add option to skip npmrc authentication
1 parent 006562b commit 8df6122

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ parameters:
99
- name: ServiceConnection
1010
type: string
1111
default: ''
12+
- name: SkipAuthentication
13+
type: boolean
14+
default: false
1215

1316
steps:
1417
- pwsh: |
@@ -25,9 +28,10 @@ steps:
2528
displayName: 'Create .npmrc'
2629
condition: ${{ parameters.CustomCondition }}
2730

28-
- task: npmAuthenticate@0
29-
displayName: Authenticate .npmrc
30-
condition: ${{ parameters.CustomCondition }}
31-
inputs:
32-
workingFile: ${{ parameters.npmrcPath }}
33-
azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}
31+
- ${{ if not(parameters.SkipAuthentication) }}:
32+
- task: npmAuthenticate@0
33+
displayName: Authenticate .npmrc
34+
condition: ${{ parameters.CustomCondition }}
35+
inputs:
36+
workingFile: ${{ parameters.npmrcPath }}
37+
azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}

0 commit comments

Comments
 (0)