KollarM opened a new issue, #7211:
URL: https://github.com/apache/incubator-devlake/issues/7211

   ### 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
   
   In Azure Devops we are using multistage CICD pipeline with 4 stages: Build, 
Dev, Test and Prod. 
   
![image](https://github.com/apache/incubator-devlake/assets/13602658/b4d29347-7914-433b-9596-d5fc4d5ccb52)
   
   Prod stage requires approval, this approval requirement timeouts after 5 
minutes. 
   
![image](https://github.com/apache/incubator-devlake/assets/13602658/938af4f4-0d7a-4f12-ae90-77be9c952a08)
   
   DevLake Scope Config is set to "The name of the Azure pipeline or one of its 
jobs matches
   (deploy|push-image|Deploy)" and "If the name also matches
   
(.*prod.*)|(.*Prod.*)|(.*PROD.*)|(.*production.*)|(.*Production.*)|(.*PRODUCTION.*)
   , this Deployment is a ‘Production Deployment’"
   
![image](https://github.com/apache/incubator-devlake/assets/13602658/ca1754fa-b247-4c4e-8af0-c5dce804b723)
   
   Issue is that DevLake Server doesn't check if Prod stage was finished or not.
   
   
   
   ### What do you expect to happen
   
   Excepted is that deployment is considered as "TESTING"when Azure Devops 
pipeline stage with name matching 
(.*prod.*)|(.*Prod.*)|(.*PROD.*)|(.*production.*)|(.*Production.*)|(.*PRODUCTION.*)
 was skipped (in our case because of approval timeout).
   
   It is also expected and very important that when Azure Devops pipeline stage 
with name matching 
(.*prod.*)|(.*Prod.*)|(.*PROD.*)|(.*production.*)|(.*Production.*)|(.*PRODUCTION.*)
 is retried after several days and Approved and ends with success, then new 
deployment is created in DevLake with environment "PRODUCTION".
   
   ### How to reproduce
   
   In Azure Devops create multistage CICD pipeline similar to this:
   
   stages:
   - stage: Build
     jobs:
     - job: Build
     ...
   
     - stage: Deploy_to_test
       displayName: Deploy to test
       jobs:
       - job: push
         displayName: Push docker image
         steps:
           ....
       - deployment: deploy
         dependsOn: push
         displayName: deploy
         environment: test
   
     - stage: Deploy_to_prod
       displayName: Deploy to prod
       dependsOn: test
       jobs:
       - job: push
         displayName: Push docker image
         steps:
           ....
       - deployment: deploy
         dependsOn: push
         displayName: deploy
         environment: prod
   
   In Azure Devops setup Environmet with name "prod" that requires approval and 
timeouts after 5 minutes
   Ran the pipeline and leave "prod" stage to timeout.
   Setup Apache DevLake Connection with regex and collect data.
     
   
   ### Anything else
   
   This is happening after each merge to master branch and makes metrics 
Deployment Frequency and Lead Time For Changes not correct.
   
   ### Version
   
   v1.0.0-beta1 and v0.21.0-beta4
   
   ### 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]

Reply via email to