You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sn...@apache.org on 2026/08/03 20:25:08 UTC

(flink) branch master updated: [hotfix][ci] Add ignore pattern in case of Azure

This is an automated email from the ASF dual-hosted git repository.

snuyanzin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 17c70e8f7ba [hotfix][ci] Add ignore pattern in case of Azure
17c70e8f7ba is described below

commit 17c70e8f7ba969c63075b15fed4a07c6b6b4839b
Author: Sergey Nuyanzin <sn...@gmail.com>
AuthorDate: Mon Aug 3 22:25:00 2026 +0200

    [hotfix][ci] Add ignore pattern in case of Azure
---
 tools/azure-pipelines/build_properties.sh | 18 ++++++++++++------
 tools/azure-pipelines/e2e-template.yml    | 14 +++++++++++++-
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/tools/azure-pipelines/build_properties.sh b/tools/azure-pipelines/build_properties.sh
index 3ab34d3daa0..72ec892c377 100755
--- a/tools/azure-pipelines/build_properties.sh
+++ b/tools/azure-pipelines/build_properties.sh
@@ -45,18 +45,24 @@ function github_num_commits() {
 	return $GITHUB_NUM_COMMITS
 }
 
-#
-# Returns 0 if the change is a documentation-only pull request
-#
-function is_docs_only_pullrequest() {
+# Returns 0 if the change only touches ignored paths (IGNORE_PATHS pipeline variable, newline-separated pathspec globs), e.g. a documentation-only pull request.
+function is_ignored_pattern_pullrequest() {
 	github_num_commits
 	GITHUB_NUM_COMMITS=$?
 	if [[ $GITHUB_NUM_COMMITS == 0 ]]; then
 		return 1
 	fi
 
-	if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS | grep -v "docs/") == "" ]] ; then
-		echo "INFO: This is a docs only change. Changed files:"
+	# A diff that lists nothing after the git excludes means only ignored paths changed.
+	local exclude_pathspecs=()
+	local pattern
+	while IFS= read -r pattern; do
+		[[ -z "$pattern" ]] && continue
+		exclude_pathspecs+=(":(exclude,glob)$pattern")
+	done <<< "$IGNORE_PATHS"
+
+	if [[ $(git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS -- . "${exclude_pathspecs[@]}") == "" ]] ; then
+		echo "INFO: Only ignored paths changed ($IGNORE_PATHS). Changed files:"
 		git diff --name-only HEAD..HEAD~$GITHUB_NUM_COMMITS
 		return 0
 	fi
diff --git a/tools/azure-pipelines/e2e-template.yml b/tools/azure-pipelines/e2e-template.yml
index 8045525156c..dcffa9b36a0 100644
--- a/tools/azure-pipelines/e2e-template.yml
+++ b/tools/azure-pipelines/e2e-template.yml
@@ -31,11 +31,23 @@ jobs:
   cancelTimeoutInMinutes: 1
   workspace:
     clean: all
+  variables:
+    # Newline-separated git pathspec globs (GitHub Actions "paths-ignore" style); PRs touching only these skip e2e.
+    IGNORE_PATHS: |
+      docs/**
+      **/*.md
+      .idea/**
+      .asf.yaml
+      .editorconfig
+      .git-blame-ignore-revs
+      .gitignore
+      .gitattributes
+      .github/**
   steps:
     # Skip e2e test execution if this is a documentation only pull request (master / release builds will still be checked regularly)
     - bash: |
         source ./tools/azure-pipelines/build_properties.sh
-        is_docs_only_pullrequest
+        is_ignored_pattern_pullrequest
         if [[ "$?" == 0 ]] ; then
           echo "##[debug]This is a documentation-only change. Skipping e2e execution."
           echo "##vso[task.setvariable variable=skip;]1"