diff --git a/.npmrc b/.npmrc index 6d6c884..2ee8f4c 100644 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1,3 @@ # Force public npm registry to avoid CI auth (E401) when no token is provided -registry=https://registry.npmjs.org/ -# Do not require auth for public installs -always-auth=false +registry=https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json + diff --git a/build/azure-devdiv-pipeline.pre-release.yml b/build/azure-devdiv-pipeline.pre-release.yml index 745181d..5a766a8 100644 --- a/build/azure-devdiv-pipeline.pre-release.yml +++ b/build/azure-devdiv-pipeline.pre-release.yml @@ -66,30 +66,7 @@ extends: artifactName: drop sbomEnabled: true steps: - - task: npmAuthenticate@0 - inputs: - workingFile: .npmrc - - - script: npm config get registry - displayName: Verify NPM Registry - - - task: NodeTool@0 - inputs: - versionSpec: '22.17.0' - checkLatest: true - displayName: Select Node 22 LTS - - - task: PipAuthenticate@1 - displayName: 'Pip Authenticate' - inputs: - artifactFeeds: 'DevDiv/debugpy' - - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.9' # note Install Python dependencies step below relies on Python 3.9 - addToPath: true - architecture: 'x64' - displayName: Select Python version + - template: build/templates/setup.yml@self - script: npm ci displayName: Install NPM dependencies diff --git a/build/azure-devdiv-pipeline.stable.yml b/build/azure-devdiv-pipeline.stable.yml index 59258d1..957c66b 100644 --- a/build/azure-devdiv-pipeline.stable.yml +++ b/build/azure-devdiv-pipeline.stable.yml @@ -59,17 +59,7 @@ extends: artifactName: drop sbomEnabled: true steps: - - task: NodeTool@0 - inputs: - versionSpec: '22.17.0' - checkLatest: true - displayName: Select Node 22 LTS - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.9' # note Install Python dependencies step below relies on Python 3.9 - addToPath: true - architecture: 'x64' - displayName: Select Python version + - template: build/templates/setup.yml@self - script: npm ci displayName: Install NPM dependencies diff --git a/build/templates/setup.yml b/build/templates/setup.yml new file mode 100644 index 0000000..694218b --- /dev/null +++ b/build/templates/setup.yml @@ -0,0 +1,26 @@ +# DevDiv pipeline setup steps (no parameters) +steps: + - task: npmAuthenticate@0 + inputs: + workingFile: .npmrc + + - script: npm config get registry + displayName: Verify NPM Registry + + - task: NodeTool@0 + inputs: + versionSpec: '22.17.0' + checkLatest: true + displayName: Select Node 22 LTS + + - task: PipAuthenticate@1 + displayName: 'Pip Authenticate' + inputs: + artifactFeeds: 'DevDiv/debugpy' + + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.9' # note Install Python dependencies step below relies on Python 3.9 + addToPath: true + architecture: 'x64' + displayName: Select Python version