azure-devops-python-api icon indicating copy to clipboard operation
azure-devops-python-api copied to clipboard

Can get a task definition by id.

Open marian-craciunescu opened this issue 7 years ago • 0 comments

Having a task definition reference by id it's not possibled to have it retrieved. I'm reffering to TaskDefinitionReference which is present both in task_agent_client.pyand build_client.py.

For example getting a pipeline definition and having mutiple build steps like

            {
              'environment': {},
              'enabled': True,
              'continueOnError': False,
              'alwaysRun': True,
              'displayName': 'Publish Artifact',
              'timeoutInMinutes': 0,
              'condition': 'succeededOrFailed()',
              'task': {
                **'id': '2ff763a7-ce83-4e1f-bc89-0ae63477cebe',**
                'versionSpec': '1.*',
                'definitionType': 'task'
              },
              'inputs': {
                'PathtoPublish': '$(build.artifactstagingdirectory)',
                'ArtifactName': 'drop',
                'ArtifactType': 'Container',
                'TargetPath': '\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)',
                'Parallel': 'false',
                'ParallelCount': '8',
                'FileCopyOptions': ''
              }
            }

I would like to be able to retrieve all task step related by using the task -> id Something like task_agent_client.get_task_by_id(task_id= '2ff763a7-ce83-4e1f-bc89-0ae63477cebe') and will return an object of type class:TaskDefinitionReference <azure.devops.v5_1.task_agent.models.TaskDefinition>

marian-craciunescu avatar Oct 30 '19 18:10 marian-craciunescu