Forum Discussion
Problems of triggering CI pipeline when renaming a data pipeline in a git-configured ADF
Hello everyone,
after I have renamed a data pipeline in a git-configured Azure Data Factory. This will result in 2 commits to the working branch:
Basically one of them renames pipeline1.json to pipeline2.json, while keeping the content unchanged. And the other commit changes the content of this json file, so from "name": "pipeline1" to "name": "pipeline2".
Since there's two commits to the branch, a CI pipeline listening on this branch will be trigger twice. For the first commit, the CI pipeline always fails because during the validation process, error arises because pipeline2.json contains the field "name": "pipeline1" (error === cmdapiapp: resource 'pipeline' has the following validation error: git file and resource name are different).
For the second commit, the CI pipeline passes because the file name of the json file is consistent with the field again i.e. pipeline2.json contains the field "name": "pipeline2".
I would really want to keep the current situation when someone make changes in the ADF, the CI is triggered to validate the ARMTemplate as some sort of CI test. This is still a viable method because the second CI always passes, but I really don't want to see failed runs in the run history. Is there some setting/workaround to make the method more robust?
Thank you very much in advanced for the help.
Patrick