This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new b21f8d248a6 Filter incremental examples build on affected artifact IDs
from the Scalpel report
b21f8d248a6 is described below
commit b21f8d248a6986f8cf8291e8ed930a3627551789
Author: James Netherton <[email protected]>
AuthorDate: Wed Nov 25 15:47:52 2026 +0000
Filter incremental examples build on affected artifact IDs from the Scalpel
report
The examples filter matched camel-quarkus-<name> against the incremental
build's affected integration test module names. Those only coincide with
extension artifact IDs by accident, so grouped test modules (e.g.
cxf-soap-grouped) and support library changes never selected any example.
Match the examples' resolved dependencies against the non-upstream
org.apache.camel.quarkus artifacts listed in the Scalpel report instead.
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.github/workflows/ci-build.yaml | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index c0bf115cb69..f62a01f8c09 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -431,15 +431,16 @@ jobs:
EXAMPLES_BRANCH=${GITHUB_BASE_REF}
fi
- # For incremental builds, only include examples that depend on an
affected extension
+ # For incremental builds, only include examples that depend on a
Camel Quarkus artifact affected by the change
EXAMPLES_INCLUDE_OPTION=""
+ SCALPEL_REPORT=${GITHUB_WORKSPACE}/target/scalpel-report.json
if [ -n "${INTEGRATION_TESTS_MODULES}" ]; then
- AFFECTED_MODULES=$(echo "${INTEGRATION_TESTS_MODULES}" | jq -r
'.modules[]')
- echo "Affected modules: $(echo ${AFFECTED_MODULES})"
+ AFFECTED_ARTIFACTS=${{ runner.temp }}/affected-artifacts.txt
+ if [ -f "${SCALPEL_REPORT}" ] \
+ && jq -r '.affectedModules[] | select(.category != "UPSTREAM"
and .groupId == "org.apache.camel.quarkus") | "\(.groupId):\(.artifactId):"'
"${SCALPEL_REPORT}" > ${AFFECTED_ARTIFACTS} \
+ && [ -s "${AFFECTED_ARTIFACTS}" ]; then
+ echo "Affected artifacts: $(cut -d: -f2 ${AFFECTED_ARTIFACTS} |
tr '\n' ' ')"
- if echo "${AFFECTED_MODULES}" | grep -qx "core"; then
- echo "Core extension affected - building all examples"
- else
CQ_VERSION=$(./mvnw help:evaluate -Dexpression=project.version
-q -DforceStdout -N)
EXAMPLES_DIR=${{ runner.temp }}/camel-quarkus-examples
@@ -459,13 +460,11 @@ jobs:
FILTERED_MODULES+=("${MODULE}")
continue
fi
- for AFFECTED in ${AFFECTED_MODULES}; do
- if grep -qw "camel-quarkus-${AFFECTED}" ${DEPS_FILES}; then
- echo "${MODULE}: depends on affected extension
camel-quarkus-${AFFECTED}"
- FILTERED_MODULES+=("${MODULE}")
- break
- fi
- done
+ MATCH=$(grep -ohF -f ${AFFECTED_ARTIFACTS} ${DEPS_FILES} |
head -1)
+ if [ -n "${MATCH}" ]; then
+ echo "${MODULE}: depends on affected artifact $(echo
${MATCH} | cut -d: -f2)"
+ FILTERED_MODULES+=("${MODULE}")
+ fi
done
EXAMPLES_INCLUDE_OPTION="-DEXAMPLES_INCLUDE=$(IFS=,; echo
"${FILTERED_MODULES[*]}")"
@@ -474,6 +473,8 @@ jobs:
else
echo "::warning::Failed to analyze camel-quarkus-examples
dependencies, building all examples"
fi
+ else
+ echo "::warning::No affected artifacts found in the Scalpel
report, building all examples"
fi
fi