CamilleTeruel commented on issue #5428: URL: https://github.com/apache/incubator-devlake/issues/5428#issuecomment-1588152188
For a given build, the plugin gets details with the timeline endpoint (https://learn.microsoft.com/en-us/rest/api/azure/devops/build/timeline/get). This returns a list of "stages", "jobs" and "tasks" (and also "phases" and "checkpoints"). For example, for the following toy `azure-pipelines.yml`: ```yaml name: azure-job trigger: - main jobs: - job: "job_1" pool: vmImage: ubuntu-latest steps: - script: echo "Starting job 1" displayName: 'log-start-job1' - script: sleep 600 displayName: 'build' - script: echo "Finished job 1" displayName: 'log-end-job1' - job: "job_2" pool: vmImage: ubuntu-latest steps: - script: echo Goodbye! displayName: 'Goodbye-step' ``` the timeline endpoint responds with: - 3 "jobs" (2 from the file + a 'Finalize build' job), - 13 "tasks"! (4 steps from the file + 9 others) - 1 implicit "stage" called `__default` - 1 "phase" and 1 "checkpoint". Given this hierarchy of task types, we needed to decide which level to map to Devlake's CICDTask. I chose the "job" level because "tasks" are too fine-grained (and contain a lot of extra tasks not declared in the file and hard to exclude if not by matching name to a bunch of regexes) and stages seemed too coarse-grained. We didn't plan on adding support for stages, but if it's needed, we can add an option to select the level to map to. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
