Skip to content

Commit e62ae74

Browse files
authored
ci: copy artifacts from all module target folders for Kokoro attestation (#406)
1 parent 15295c2 commit e62ae74

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.kokoro/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,11 @@ ARTIFACTS_DIR="${REPO_DIR}/artifacts"
119119
mkdir -p "${ARTIFACTS_DIR}"
120120

121121
# Copy target jars and poms (excluding test jars) to be captured by build.cfg
122-
find target/ -maxdepth 1 -name "*.jar" -o -name "*.pom" | grep -v "test" | xargs -I {} cp {} "${ARTIFACTS_DIR}/"
122+
# Copy target jars and poms from all module target/ folders across the package hierarchy,
123+
# while explicitly excluding unit test artifacts (test-classes/, *-tests.jar, *-test-sources.jar)
124+
find . -path "*/target/*" \
125+
\( -name "*.jar" -o -name "*.pom" \) \
126+
! -path "*/test-classes/*" \
127+
! -name "*-tests.jar" \
128+
! -name "*-test-sources.jar" \
129+
| xargs -r -I {} cp {} "${ARTIFACTS_DIR}/"

0 commit comments

Comments
 (0)