2

So I cloned their repository, but how do I actually build the tasks?

Here is my scenario. We use Azure DevOps Server 2020 (on prem). All of our build pipelines run the Index Sources & Publish Symbols task

However, it has a bug https://github.com/microsoft/azure-pipelines-tasks/issues/14852. Luckily a fix was merged to master. However, we are not going to see it until it is propagated to the Azure DevOps Server edition and only All Mighty knows when it would happen.

So, I would like to build that task locally and upload to our Azure DevOps server. But I cannot find instructions on how to do it.

So, how can I build and consume it in our Azure DevOps Server?

EDIT 1

Tried to follow the procedure in https://github.com/microsoft/azure-pipelines-tasks/blob/master/ci/build-all-steps.yml, but it did not work.

The first step that seems relevant to me is https://github.com/microsoft/azure-pipelines-tasks/blob/6ab084f52e582370880127132d1c449634c9bfbc/ci/build-all-steps.yml#L39:

- script: |
    cd ci
    cd verifyMinAgentDemands
    npm install
    node index.js
  displayName: Verify all min agent demands are valid

And it is fine:

C:\work\azure-pipelines-tasks\ci\verifyMinAgentDemands [master ≡]> npm install
npm WARN verifyminagentdemands@1.0.0 No description
npm WARN verifyminagentdemands@1.0.0 No repository field.

added 52 packages from 78 contributors and audited 52 packages in 1.743s
found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
C:\work\azure-pipelines-tasks\ci\verifyMinAgentDemands [master ≡]> node .\index.js
##vso[task.debug]agent.TempDirectory=undefined
##vso[task.debug]agent.workFolder=undefined
##vso[task.debug]loading inputs and endpoints
##vso[task.debug]loaded 0
##vso[task.debug]Agent.ProxyUrl=undefined
##vso[task.debug]Agent.CAInfo=undefined
##vso[task.debug]Agent.ClientCert=undefined
##vso[task.debug]Agent.SkipCertValidation=undefined
Verifying min agent demands.
Latest version of the Agent that's fully rolled out is 2.195.0.

The next step (https://github.com/microsoft/azure-pipelines-tasks/blob/6ab084f52e582370880127132d1c449634c9bfbc/ci/build-all-steps.yml#L47) seems to be relevant too:

- script: node make.js build --task "$(task_pattern)"
  displayName: Build
  condition: ne(variables['numTasks'], 0)

But:

C:\work\azure-pipelines-tasks [master ≡]> node make.js build --task PublishSymbolsV2

> prepending PATH C:\work\azure-pipelines-tasks\node_modules\.bin
tsc tool:
Version 2.3.4
C:\work\azure-pipelines-tasks\node_modules\.bin\tsc
npm tool:
6.14.12
C:\Program Files\nodejs\npm

------------------------------------------------------------
Building: PublishSymbolsV2
------------------------------------------------------------

> getting task externals
Downloading file: https://vstsagenttools.blob.core.windows.net/tools/symstore/2/symbol.zip
Could not use "nc", falling back to slower node.js method for sync requests.
C:\work\azure-pipelines-tasks\node_modules\sync-request\index.js:77
    throw new Error(res.stderr.toString());
    ^

Error
    at doRequestWith (C:\work\azure-pipelines-tasks\node_modules\sync-request\index.js:77:11)
    at doRequest (C:\work\azure-pipelines-tasks\node_modules\sync-request\index.js:20:10)
    at downloadFile (C:\work\azure-pipelines-tasks\make-util.js:411:22)
    at downloadArchive (C:\work\azure-pipelines-tasks\make-util.js:451:27)
    at C:\work\azure-pipelines-tasks\make-util.js:644:33
    at Array.forEach (<anonymous>)
    at getExternals (C:\work\azure-pipelines-tasks\make-util.js:639:25)
    at C:\work\azure-pipelines-tasks\make.js:193:13
    at Array.forEach (<anonymous>)
    at Function.target.build (C:\work\azure-pipelines-tasks\make.js:158:14)
C:\work\azure-pipelines-tasks [master ≡]>

What is now?

mark
  • 59,016
  • 79
  • 296
  • 580
  • Did you look through the [ci](https://github.com/microsoft/azure-pipelines-tasks/blob/master/ci/build-all-steps.yml) folder already? I'd assume you could look at how the project builds to get some ideas. Otherwise, I think when I was installing extensions I would just get a VSIX. You might be able to skip some of the [steps from the example](https://learn.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#step-4-package-your-extension) without having to publish to the marketplace. – Matt Nov 19 '21 at 23:05
  • Looking at the ci folder is an excellent idea. I will give it a try. I will check your other idea as well. Thank you. – mark Nov 20 '21 at 03:04
  • Does this answer your question? [Visual Studio 2022 not listed in devops build solution pipeline task](https://stackoverflow.com/questions/70174595/visual-studio-2022-not-listed-in-devops-build-solution-pipeline-task) – Matt Dec 01 '21 at 17:20
  • @Matt - It looks like. Although the answer mentions a file named **vss-extension.json**. The azure pipeline tasks do not have this file. So, I need to create a new one. What should go into it? No idea. Will have to find time to figure it out, unless some Good Samaritan helps out... – mark Dec 01 '21 at 21:28
  • I'm sorry I can't help you more, not something I have done. I just saw that answer and thought of this question again. That blog on the answer has some more embedded details. Maybe jesse will be responsive to questions on either that answer or the blog posting. Good luck! – Matt Dec 01 '21 at 22:16

0 Answers0