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

updateTasksId does not resolve task manifest path #188

Open
charleszipp opened this issue Mar 1, 2021 · 6 comments
Open

updateTasksId does not resolve task manifest path #188

charleszipp opened this issue Mar 1, 2021 · 6 comments

Comments

@charleszipp
Copy link
Member

Hi there, I am trying to update my terraform task extension to use this for publishing/packaging.

I am unable to get the updateTasksId feature to update the task id's of the tasks in my extension. The tasks are compiled to a .dist directory before being packaged. For this to work, the vss-extension manifest has a files array that maps the path of the task files to the task name (see example below). It appears that the updateTasksId expects the task manifest to live in a directory with the same name as the extension and does not utilize the files array in the manifest to resolve the location.

The extension task publishes my extension without errors but, the task id is still the same as what I have defined in my manifest.

"files": [
        { "path": "tasks/terraform-cli/.dist", "packagePath": "TerraformCLI" },
        { "path": "tasks/terraform-installer/.dist", "packagePath": "TerraformInstaller" }
    ],
    "contributions": [
        {
            "id": "azure-pipelines-tasks-terraform-cli",
            "type": "ms.vss-distributed-task.task",
            "targets": [
                "ms.vss-distributed-task.tasks"
            ],
            "properties": {
                "name": "TerraformCLI",
                "supportsTasks": [
                    "721c3f90-d938-11e8-9d92-09d7594721b5"
                ]
            }
        },
        {
            "id": "azure-pipelines-tasks-terraform-installer",
            "type": "ms.vss-distributed-task.task",
            "targets": [
                "ms.vss-distributed-task.tasks"
            ],
            "properties": {
                "name": "TerraformInstaller",
                "supportsTasks": [
                    "11645770-d18e-11e8-8f5b-1b8b62612b3b"
                ]
            }
        }
    ]
@charleszipp
Copy link
Member Author

I was checking here and expecting some evaluation of the files property in the root manifest to locate the task root directory.

@jessehouwing
Copy link
Collaborator

Path redirection in the manifest is something we don't support yet.

The code assumes the tasks live in a folder that is bated on their contribution name.

You're the first to use this as far as I can tell.

@jessehouwing
Copy link
Collaborator

I'm open to a PR on this one.

@charleszipp
Copy link
Member Author

If I get some availability I would be open to tackling this. I will come back and assign myself if that happens.

@jessehouwing do you believe based on your experience, if the task id's are modified, could i support multiple tagged versions of the extension in a single org? For example if I have alpha, beta, rc, and ga (where ga is the only public version) that I could install all those and use them within a single org? If so that, would help dramatically reduce the overhead and complexity of my extensions' ci/cd pipeline

@jessehouwing
Copy link
Collaborator

For build tasks, yes you can have as many tasks deployed side by side as long as the have a unique taskid and a unique extensionid.

That is the purpose.

The alternative is to have separate organisations for each promotion level.

See also:

@charleszipp
Copy link
Member Author

Thanks @jessehouwing

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

2 participants