medhatfawzy opened a new issue, #8669: URL: https://github.com/apache/incubator-devlake/issues/8669
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened I've set up the Azure DevOps plugin to scan four repos in my project. The plugin managed to read the pipeline runs successfully. However, it failed to read the environment name, and it failed to detect prod deployments. I've configured a scope config in order for the plugin to detect the prod deployments correctly, because the name of the prod environment is usually `[a-z]{2,4}-prod` <img width="925" height="290" alt="Image" src="https://github.com/user-attachments/assets/eff9be4b-8b7c-47f5-94a1-609c95e70ac5" /> My Azure pipeline YAML file is a bit complex because the team uses some reusable templates that are modular and shared across different services. It consists of stages, and the deployment stage contains jobs like `helm: deploy` and `terraform: deploy` , but not a job with the env name. The env name is in the stage. However, there's a job called predeploy_.*_prod , which should be matched by the regex I am using. However, it wasn't and DevLake is failing to detect the names of the environments. This is a picture of the pipeline: <img width="1548" height="398" alt="Image" src="https://github.com/user-attachments/assets/96df480d-1939-4140-b2b4-8b0c6645e265" /> And this is the structure of the pipeline YAML file: ```yaml resources: repositories: - repository: repo1 - repository: repo2 trigger: branches: include: - main parameters: - name: operation displayName: Operation type: string default: Deploy values: - Deploy - Destroy - Helmrollback variables: - name: name1 value: value1 stages: - stage: prebuild isSkippable: false displayName: Prebuild dependsOn: [] condition: succeeded() variables: - name: name1 value: value1 - name: name2 value: value2 jobs: - job: initialize_framework displayName: "Initialize framework" pool: name: server - job: job1 timeoutInMinutes: 180 pool: name: pool1 steps: - task: xxxxxxxxxxxxxxxxxxxx@1 condition: false inputs: alias: none ..... - stage: predeploy_xxxx_prod displayName: 'Predeploy: xxxx-prod' dependsOn: jobs: - job: initialize_framework displayName: "Initialize framework" pool: name: server - job: predeploy_xxx_prod_variables pool: name: pool1 ..... - stage: deploy_xxxxx_prod displayName: 'Deploy: xxx-prod' dependsOn: - .xxxxxx condition: succeeded() variables: - name: name1 value: value1 jobs: - job: initialize_framework displayName: "Initialize framework" pool: name: server - deployment: deploy_xxxxx_prod_helm environment: name: xxxxx-prod pool: name: pool1 timeoutInMinutes: 180 strategy: runOnce: deploy: steps: - task: xxxxxxxx@1 condition: false inputs: alias: none ..... ``` ### What do you expect to happen When scanning ADO pipeline runs, it should fetch the environment names correctly and detect which deployment is a prod deployment. ### How to reproduce - Set up an ADO connection with an Azure pipeline for a service that has different environment names, like dev, test and prod. - Add the connection to the project - Run the pipeline - Try to query production deployments ### Anything else I've tried multiple regex, but the problem kept happening ### Version v1.0.2@41c047d ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
