diff --git a/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml b/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml index 1fc00dd..238fc4f 100644 --- a/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml +++ b/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml @@ -1,4 +1,4 @@ server: cancelTimeoutInMinutes: 5 steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml b/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml index 84cca76..1cc6171 100644 --- a/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml +++ b/examples/extracted/JobCancelTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml @@ -1,4 +1,4 @@ cancelTimeoutInMinutes: 5 pool: server steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml b/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml index d43ecc1..3a80dca 100644 --- a/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml +++ b/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml @@ -4,9 +4,9 @@ phases: server: cancelTimeoutInMinutes: 5 steps: - - task: foo@1 + - task: Bash@3 - phase: job3 server: cancelTimeoutInMinutes: $[ variables.theCancelTimeoutInMinutes ] steps: - - task: foo@1 \ No newline at end of file + - task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml b/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml index 389f04b..5d53a90 100644 --- a/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml +++ b/examples/extracted/JobCancelTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml @@ -4,9 +4,9 @@ jobs: cancelTimeoutInMinutes: 5 pool: server steps: - - task: foo@1 + - task: Bash@3 - job: job3 cancelTimeoutInMinutes: $[ variables.theCancelTimeoutInMinutes ] pool: server steps: - - task: foo@1 \ No newline at end of file + - task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobPool_FromImpliedJob_LegacyServer.0.yml b/examples/extracted/JobPool_FromImpliedJob_LegacyServer.0.yml index 61931a3..52141e7 100644 --- a/examples/extracted/JobPool_FromImpliedJob_LegacyServer.0.yml +++ b/examples/extracted/JobPool_FromImpliedJob_LegacyServer.0.yml @@ -1,3 +1,3 @@ server: true steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobPool_FromImpliedJob_LegacyServer.1.yml b/examples/extracted/JobPool_FromImpliedJob_LegacyServer.1.yml index 94a68ae..9a51390 100644 --- a/examples/extracted/JobPool_FromImpliedJob_LegacyServer.1.yml +++ b/examples/extracted/JobPool_FromImpliedJob_LegacyServer.1.yml @@ -1,3 +1,3 @@ pool: server steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobSteps_FromImpliedJob.0.yml b/examples/extracted/JobSteps_FromImpliedJob.0.yml index 02de436..d3eecf6 100644 --- a/examples/extracted/JobSteps_FromImpliedJob.0.yml +++ b/examples/extracted/JobSteps_FromImpliedJob.0.yml @@ -1,3 +1,3 @@ steps: -- task: foo@1 +- task: Bash@3 - script: echo hi \ No newline at end of file diff --git a/examples/extracted/JobSteps_FromJob.0.yml b/examples/extracted/JobSteps_FromJob.0.yml index 539807a..7a8c5cc 100644 --- a/examples/extracted/JobSteps_FromJob.0.yml +++ b/examples/extracted/JobSteps_FromJob.0.yml @@ -1,5 +1,5 @@ jobs: - job: myJob steps: - - task: foo@1 + - task: Bash@3 - script: echo hi \ No newline at end of file diff --git a/examples/extracted/JobSteps_FromLegacyPhase.0.yml b/examples/extracted/JobSteps_FromLegacyPhase.0.yml index 9e3b5dc..7093621 100644 --- a/examples/extracted/JobSteps_FromLegacyPhase.0.yml +++ b/examples/extracted/JobSteps_FromLegacyPhase.0.yml @@ -1,5 +1,5 @@ phases: - phase: myJob steps: - - task: foo@1 + - task: Bash@3 - script: echo hi \ No newline at end of file diff --git a/examples/extracted/JobSteps_FromLegacyPhase.1.yml b/examples/extracted/JobSteps_FromLegacyPhase.1.yml index 539807a..7a8c5cc 100644 --- a/examples/extracted/JobSteps_FromLegacyPhase.1.yml +++ b/examples/extracted/JobSteps_FromLegacyPhase.1.yml @@ -1,5 +1,5 @@ jobs: - job: myJob steps: - - task: foo@1 + - task: Bash@3 - script: echo hi \ No newline at end of file diff --git a/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.0.yml b/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.0.yml index 33a7d3d..c107cf8 100644 --- a/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.0.yml +++ b/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.0.yml @@ -8,4 +8,4 @@ server: config: debug parallel: 2 steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.1.yml b/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.1.yml index 2b2f7b6..a64a93b 100644 --- a/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.1.yml +++ b/examples/extracted/JobStrategy_Matrix_FromImpliedJob_LegacyServer.1.yml @@ -9,4 +9,4 @@ strategy: maxParallel: 2 pool: server steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.0.yml b/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.0.yml index 98e87b9..a4aa7b8 100644 --- a/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.0.yml +++ b/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.0.yml @@ -24,4 +24,4 @@ phases: matrix: $[ variables.matrix ] parallel: $[ variables.maxParallel ] steps: - - task: foo@1 \ No newline at end of file + - task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.1.yml b/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.1.yml index ac962ae..0e8edda 100644 --- a/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.1.yml +++ b/examples/extracted/JobStrategy_Matrix_FromLegacyPhase_LegacyServer.1.yml @@ -27,4 +27,4 @@ jobs: maxParallel: $[ variables.maxParallel ] pool: server steps: - - task: foo@1 \ No newline at end of file + - task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml b/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml index 4000646..083ae6d 100644 --- a/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml +++ b/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.0.yml @@ -1,4 +1,4 @@ server: timeoutInMinutes: 5 steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml b/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml index bc3502a..7522c41 100644 --- a/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml +++ b/examples/extracted/JobTimeoutInMinutes_FromImpliedJob_LegacyServer.1.yml @@ -1,4 +1,4 @@ timeoutInMinutes: 5 pool: server steps: -- task: foo@1 \ No newline at end of file +- task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml b/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml index d269d03..c68df7f 100644 --- a/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml +++ b/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.0.yml @@ -4,9 +4,9 @@ phases: server: timeoutInMinutes: 5 steps: - - task: foo@1 + - task: Bash@3 - phase: job3 server: timeoutInMinutes: $[ variables.theTimeoutInMinutes ] steps: - - task: foo@1 \ No newline at end of file + - task: Bash@3 \ No newline at end of file diff --git a/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml b/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml index dbc3216..25a2848 100644 --- a/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml +++ b/examples/extracted/JobTimeoutInMinutes_FromLegacyPhase_LegacyServer.1.yml @@ -4,9 +4,9 @@ jobs: timeoutInMinutes: 5 pool: server steps: - - task: foo@1 + - task: Bash@3 - job: job3 timeoutInMinutes: $[ variables.theTimeoutInMinutes ] pool: server steps: - - task: foo@1 \ No newline at end of file + - task: Bash@3 \ No newline at end of file diff --git a/tools/extract-yaml-testcases/src/main.ts b/tools/extract-yaml-testcases/src/main.ts index 4dbcb8c..5ab320e 100644 --- a/tools/extract-yaml-testcases/src/main.ts +++ b/tools/extract-yaml-testcases/src/main.ts @@ -66,7 +66,10 @@ function outputYaml(name: string, body: string, outputDir: string) { let number = 0; while (mlString !== null) { const finalFileName = [outputBaseName, number.toString(), 'yml'].join('.'); - fs.writeFile(finalFileName, mlString[1].trim(), 'utf8', (err: NodeJS.ErrnoException) => { + const rawContents = mlString[1].trim(); + // replace tasks called "foo@1" with a real task name + const cookedContents = rawContents.replace(/foo@1/gi, "Bash@3"); + fs.writeFile(finalFileName, cookedContents, 'utf8', (err: NodeJS.ErrnoException) => { if (err) { console.error('trouble writing ' + finalFileName); }