Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR - Provide a way to get Task/Extension information #957

Closed
Herve-M opened this issue Jul 24, 2023 · 4 comments
Closed

FR - Provide a way to get Task/Extension information #957

Herve-M opened this issue Jul 24, 2023 · 4 comments

Comments

@Herve-M
Copy link

Herve-M commented Jul 24, 2023

Environment

azure-pipelines-task-lib version: 4.4.0

Issue Feature request description

Little feature request as I didn't find any API in 'azure-pipelines-task-lib/task' to provide information from task.json or extension-vss.json from within task context.

Example of usage:

  • Getting meta information as id, version, ..
  • Getting possible "hard-coded" configuration
@jessehouwing
Copy link
Contributor

Task.json should be easy. The file is usually next to the index.js/ps1 and since it's plain Json can easily be parsed. In both PowerShell and Node it's easy to request the folder of the currently executing file.

The vss-extension.json is a bit of a nightmare due to several reasons:

  • A task doesn't have to be shipped by an extension.
  • the vss-extension.json is broken into a Json and an xml manifest during publish. The original manifest is lost.
  • at publish time multiple manifest files can be merged together.
  • the name isn't fixed during publishing.
  • it's not available on the agent, since it's lost during the installation of the task in the Azure DevOps org/project collection.

I think you can still request it from the REST API using the marketplace/extensions API. Each extension has a list of published files and there are specific asset types for the extension manifests. You can query the task's extension id through the Distributed task API.

@LiliaSabitova
Copy link

Hi @Herve-M, thank you for your request.
We are currently working on higher-priority issues, but we will investigate this issue later.

@github-actions
Copy link

This issue has had no activity in 90 days. Please comment if it is not actually stale

@Herve-M
Copy link
Author

Herve-M commented Nov 8, 2023

re-open for tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants