Visitar URL original
chore(release): add multi-platform release JAR build pipeline by andygrove · Pull Request #87 · apache/datafusion-java · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
chore(release): tighten release scripts after review
Address review feedback on the multi-platform JAR pipeline:

- build-release.sh: pre-clean leftover builder containers before the
  first `docker run`. Without this, a prior SIGKILL'd run leaves named
  containers behind and the next invocation fails immediately on
  `docker run --name` with a name conflict.
- publish-to-maven.sh: pass `--fail-with-body` to the upload-loop and
  close-staging curl calls. curl exits 0 on HTTP 4xx/5xx by default,
  which would silently let an unauthorised or rejected upload run to
  completion and corrupt the staging repo.
- Dockerfile: fold gcc-10 / g++-10 / cpp-10 into the main
  `apt-get install --no-install-recommends -y` layer so the apt cache
  stays consistent and the layer count is reduced.
- README: document `xmllint` as a release-manager prerequisite (used
  by publish-to-maven.sh to parse Nexus staging responses).
  • Loading branch information
andygrove committed May 25, 2026
commit 3da6f7b00aad7d9ff361458ad77d633698f489ca
1 change: 1 addition & 0 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ for the common platforms. This section covers building that JAR.
- Java 17+
- Rust toolchain via rustup
- `gpg` configured with a key listed in the ASF KEYS file
- `xmllint` on `PATH` (pre-installed on macOS; `libxml2-utils` on Debian/Ubuntu)

### Build the multi-platform JAR

Expand Down
3 changes: 3 additions & 0 deletions dev/release/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ cleanup() {
}
trap cleanup SIGINT SIGTERM EXIT

echo "Cleaning leftover builder containers from any prior interrupted run"
docker rm -f "$CONTAINER_AMD64" "$CONTAINER_ARM64" >/dev/null 2>&1 || true

echo "Cleaning previous Java and native build output"
(cd "$PROJECT_HOME" && ./mvnw -q clean)
(cd "$PROJECT_HOME/native" && cargo clean)
Expand Down
7 changes: 4 additions & 3 deletions dev/release/datafusion-java-rm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ RUN export LC_ALL=C \
libbz2-dev \
zlib1g-dev \
default-jdk \
unzip

RUN apt install -y gcc-10 g++-10 cpp-10
unzip \
gcc-10 \
g++-10 \
cpp-10
ENV CC="gcc-10"
ENV CXX="g++-10"

Expand Down
8 changes: 5 additions & 3 deletions dev/release/publish-to-maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@ for file in $(find . -type f); do
FILE_SHORT=$(echo "$file" | sed -e "s/\.\///")
DEST_URL="$NEXUS_UPLOAD/org/apache/datafusion/$FILE_SHORT"
echo " Uploading $FILE_SHORT"
curl -u "$ASF_USERNAME:$ASF_PASSWORD" --upload-file "$FILE_SHORT" "$DEST_URL"
curl --fail-with-body \
-u "$ASF_USERNAME:$ASF_PASSWORD" \
--upload-file "$FILE_SHORT" "$DEST_URL"
done

echo "Closing nexus staging repository"
REPO_REQUEST="<promoteRequest><data><stagedRepositoryId>$STAGED_REPO_ID</stagedRepositoryId><description>Apache DataFusion Java (commit $GIT_HASH)</description></data></promoteRequest>"
curl -X POST -d "$REPO_REQUEST" -u "$ASF_USERNAME:$ASF_PASSWORD" \
-H "Content-Type:application/xml" -v \
curl --fail-with-body -X POST -d "$REPO_REQUEST" -u "$ASF_USERNAME:$ASF_PASSWORD" \
-H "Content-Type:application/xml" \
"$NEXUS_ROOT/profiles/$NEXUS_PROFILE/finish"
echo "Closed Nexus staging repository: $STAGED_REPO_ID"

Expand Down
Loading