Skip to content

Commit ae93a58

Browse files
committed
fixing build warning in initialize pipeline
1 parent ad8d121 commit ae93a58

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/ci-cd/authentication-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ variables:
146146
- group: apim-config # Contains APIM_RESOURCE_GROUP, APIM_SERVICE_NAME, etc.
147147

148148
steps:
149-
- task: NodeTool@0
149+
- task: UseNode@1
150150
inputs:
151151
versionSpec: '22.x'
152152

docs/ci-cd/azure-devops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ flowchart TD
6565
J --> L[Log: create a pull request]
6666
```
6767

68-
1. **Node.js setup** — Installs Node.js 22.x via `NodeTool@0`
68+
1. **Node.js setup** — Installs Node.js 22.x via `UseNode@1`
6969
2. **Install dependencies** — Runs `npm ci`
7070
3. **Run extract** — Executes `apiops extract` via `AzureCLI@2` task, authenticating through the service connection
7171
4. **Publish artifacts** — Uploads the artifact directory as a pipeline artifact named `apim-artifacts`

docs/walkthrough/air-gapped-azure-devops-local-registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ The generated pipelines (`pipelines/run-extractor.yaml` and `pipelines/run-publi
183183
| Edit | What to Change |
184184
|------|----------------|
185185
| 1. **Agent pool** | Update [pool YAML schema](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pool?view=azure-pipelines). Replace `pool: vmImage: ubuntu-latest` with self-hosted agent pool (e.g., `pool: name: air-gapped-pool`).<br>(See next step [Configure the Azure DevOps Self-Hosted Agent](#3-configure-the-azure-devops-self-hosted-agent) for setup details.) |
186-
| 2. **Remove NodeTool task** | Delete the `NodeTool@0` step (Node.js is pre-installed on the agent). |
186+
| 2. **Remove UseNode task** | Delete the `UseNode@1` step (Node.js is pre-installed on the agent). |
187187
| 3. **Add feed auth** | Insert [`npmAuthenticate@0`](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/npm-authenticate-v0?view=azure-pipelines) before the `npm ci` step. See necessary. yaml snippet below. |
188188

189189
Add this task before any `npm ci` step in both pipelines:

docs/walkthrough/air-gapped-azure-devops-offline-tarball.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The generated pipelines (`pipelines/run-extractor.yaml` and `pipelines/run-publi
102102
| Edit | What to Change |
103103
|------|----------------|
104104
| 1. **Agent pool** | Update [pool YAML schema](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/pool?view=azure-pipelines). Replace `pool: vmImage: ubuntu-latest` with self-hosted agent pool (e.g. `pool: name: air-gapped-pool`). <br> (See next step [Configure the Azure DevOps Self-Hosted Agent](#3-configure-the-azure-devops-self-hosted-agent) for setup details.) |
105-
| 2. **Remove NodeTool task** | Delete the `NodeTool@0` step (Node.js is pre-installed on the agent).<br> No `npmAuthenticate@0` task is needed for offline mode. |
105+
| 2. **Remove UseNode task** | Delete the `UseNode@1` step (Node.js is pre-installed on the agent).<br> No `npmAuthenticate@0` task is needed for offline mode. |
106106
| 3. **Use offline `npm ci`** | Change `npm ci` to `npm ci --offline`. |
107107

108108
### 2.4 Commit `apiops` related files

src/templates/azure-devops/extract-pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ variables:
3838
- group: apim-common
3939
4040
steps:
41-
- task: NodeTool@0
41+
- task: UseNode@1
4242
displayName: 'Setup Node.js'
4343
inputs:
4444
versionSpec: '22.x'

src/templates/azure-devops/publish-pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function generatePublishPipeline(config: PublishPipelineConfig): string {
3434
- checkout: self
3535
fetchDepth: 2
3636
37-
- task: NodeTool@0
37+
- task: UseNode@1
3838
displayName: 'Setup Node.js'
3939
inputs:
4040
versionSpec: '22.x'

tests/unit/templates/azure-devops/extract-pipeline.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('azure-devops/extract-pipeline', () => {
4848

4949
it('should include Node.js setup step', () => {
5050
const pipeline = generateExtractPipeline({ artifactDir: './apim-artifacts' });
51-
expect(pipeline).toContain('NodeTool@0');
51+
expect(pipeline).toContain('UseNode@1');
5252
expect(pipeline).toContain("versionSpec: '22.x'");
5353
});
5454

0 commit comments

Comments
 (0)