From 45da7bf16b30c1711b589d739b640db74399186a Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Saenz Date: Tue, 31 Dec 2024 12:05:19 -0500 Subject: [PATCH] [CI] Make the API diff be triggered as soon as the config of the build is done. The allows the pipeline to be triggered by the build allowing use to not need to tell azp to run apidiff and simply use '/azp run xamarin-macios-pr' --- tools/devops/automation/run-ci-api-diff.yml | 33 +++++++-------------- tools/devops/automation/run-pr-api-diff.yml | 26 +++++----------- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/tools/devops/automation/run-ci-api-diff.yml b/tools/devops/automation/run-ci-api-diff.yml index ae851ebf6ad8..8ca501d35892 100644 --- a/tools/devops/automation/run-ci-api-diff.yml +++ b/tools/devops/automation/run-ci-api-diff.yml @@ -1,27 +1,16 @@ # Pipeline that will calculate the api diff on a ci commit. -trigger: - branches: - include: - - '*' - exclude: - - refs/heads/locfiles/* - - refs/heads/dev/* - - refs/heads/darc-* - - refs/heads/backport-pr-* - paths: - exclude: - - .github - - docs - - CODEOWNERS - - ISSUE_TEMPLATE.md - - LICENSE - - NOTICE.txt - - SECURITY.MD - - README.md - - src/README.md - - tools/mtouch/README.md - - msbuild/Xamarin.Localization.MSBuild/README.md +trigger: none +pr: none + +# we cannot use a template in a pipeline context +resources: + pipelines: + - pipeline: macios + source: \Xamarin\Mac-iOS\ci pipelines\xamarin-macios-ci + trigger: + stages: + - configure_build extends: template: templates/pipelines/api-diff-pipeline.yml diff --git a/tools/devops/automation/run-pr-api-diff.yml b/tools/devops/automation/run-pr-api-diff.yml index 3b2681cf6396..45fa00449949 100644 --- a/tools/devops/automation/run-pr-api-diff.yml +++ b/tools/devops/automation/run-pr-api-diff.yml @@ -1,25 +1,15 @@ # Pipeline that will calculate the api diff on a pr commit. trigger: none +pr: none -pr: - autoCancel: true - branches: - include: - - '*' # yes, you do need the quote, * has meaning in yamls - paths: - exclude: - - .github - - docs - - CODEOWNERS - - ISSUE_TEMPLATE.md - - LICENSE - - NOTICE.txt - - SECURITY.MD - - README.md - - src/README.md - - tools/mtouch/README.md - - msbuild/Xamarin.Localization.MSBuild/README.md +resources: + pipelines: + - pipeline: macios + source: \Xamarin\Mac-iOS\pr pipelines\xamarin-macios-pr + trigger: + stages: + - configure_build extends: template: templates/pipelines/api-diff-pipeline.yml