Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/actions/incremental-build/incremental-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ echo "Using MAVEN_EXTRA_ARGS=${MAVEN_EXTRA_ARGS:-}"
maxNumberOfTestableProjects=50

# Modules excluded from targeted testing (generated code, meta-modules, etc.)
EXCLUSION_LIST="!:camel-allcomponents,!:dummy-component,!:camel-catalog,!:camel-catalog-console,!:camel-catalog-maven,!:camel-catalog-suggest,!:camel-route-parser,!:camel-report-maven-plugin,!:camel-endpointdsl,!:camel-componentdsl,!:camel-endpointdsl-support,!:camel-yaml-dsl,!:camel-kamelet-main,!:camel-yaml-dsl-deserializers,!:camel-yaml-dsl-maven-plugin,!:camel-jbang-core,!:camel-jbang-main,!:camel-jbang-plugin-generate,!:camel-jbang-plugin-edit,!:camel-jbang-plugin-kubernetes,!:camel-jbang-plugin-test,!:camel-launcher,!:camel-jbang-it,!:camel-itest,!:docs,!:apache-camel,!:coverage,!:camel-salesforce-maven-plugin"
EXCLUSION_LIST="!:camel-allcomponents,!:dummy-component,!:camel-catalog,!:camel-catalog-console,!:camel-catalog-maven,!:camel-catalog-suggest,!:camel-route-parser,!:camel-report-maven-plugin,!:camel-endpointdsl,!:camel-componentdsl,!:camel-endpointdsl-support,!:camel-yaml-dsl,!:camel-kamelet-main,!:camel-yaml-dsl-deserializers,!:camel-yaml-dsl-maven-plugin,!:camel-jbang-core,!:camel-jbang-main,!:camel-jbang-plugin-generate,!:camel-jbang-plugin-edit,!:camel-jbang-plugin-kubernetes,!:camel-jbang-plugin-test,!:camel-launcher,!:camel-jbang-it,!:camel-itest,!:docs,!:apache-camel,!:coverage"


# Allow projects to override the exclusion list
Expand All @@ -59,13 +59,14 @@ fi
# ── Utility functions ──────────────────────────────────────────────────

# Walk up from a file path to find the nearest directory containing a pom.xml
# that is a real reactor module. A pom.xml located under a module's src/ directory
# (src/it, src/main/resources, src/test/resources, ...) is a test fixture or a
# template, not a reactor module, so keep walking up to the owning module.
findProjectRoot() {
local path=${1}
while [[ "$path" != "." ]]; do
if [[ ! -e "$path/pom.xml" ]]; then
if [[ ! -e "$path/pom.xml" || "$path" == */src/* ]]; then
path=$(dirname "$path")
elif [[ $(dirname "$path") == */src/it ]]; then
path=$(dirname "$(dirname "$path")")
else
break
fi
Expand Down Expand Up @@ -314,6 +315,13 @@ runScalpelDetection() {
return
fi

# Ignore pom.xml fixtures/templates located under a module's src/ directory
# (e.g. src/it, src/main/resources): they are not part of the reactor.
local filtered_report="target/scalpel-report-filtered.json"
if jq '.affectedModules |= map(select((.path // "") | test("/src/(main|test|it)/") | not))' "$report" > "$filtered_report" 2>/dev/null; then
report="$filtered_report"
fi

# Extract affected module artifactIds (colon-prefixed for Maven -pl compatibility)
scalpel_module_ids=$(jq -r '.affectedModules[].artifactId' "$report" 2>/dev/null | sort -u | sed 's/^/:/' | tr '\n' ',' | sed 's/,$//' || true)
scalpel_module_paths=$(jq -r '.affectedModules[].path' "$report" 2>/dev/null | sort -u | tr '\n' ',' | sed 's/,$//' || true)
Expand Down Expand Up @@ -762,7 +770,7 @@ main() {
local pom_files=""

for project in ${projects}; do
if [[ ${project} == */archetype-resources ]]; then
if [[ ${project} == */archetype-resources || ${project} == */archetype-resources/* ]]; then
continue
elif [[ ${project} != .* ]]; then
local projectRoot
Expand Down
2 changes: 0 additions & 2 deletions .github/actions/incremental-build/manual-it-mapping.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#
# Format: source-artifact-id : it-module-path : command
#
# Salesforce Maven Plugin integration tests
camel-salesforce-maven-plugin:components/camel-salesforce/camel-salesforce-maven-plugin:mvn verify -f components/camel-salesforce/camel-salesforce-maven-plugin -Pplugin-itest
# JBang integration tests
camel-jbang-core:dsl/camel-jbang/camel-jbang-it:mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
camel-jbang-main:dsl/camel-jbang/camel-jbang-it:mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
Expand Down
Loading