You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2022/11/16 18:11:11 UTC

[arrow-adbc] branch main updated: ci(java): fix env vars in Java JAR upload (#182)

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

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 83bd65c  ci(java): fix env vars in Java JAR upload (#182)
83bd65c is described below

commit 83bd65cdf457d304def8454a674aea87f4f1d5ee
Author: David Li <li...@gmail.com>
AuthorDate: Wed Nov 16 13:11:05 2022 -0500

    ci(java): fix env vars in Java JAR upload (#182)
---
 .github/workflows/packaging-wheels.yml | 3 ++-
 ci/scripts/java_jar_upload.sh          | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/packaging-wheels.yml b/.github/workflows/packaging-wheels.yml
index 5a08161..7cd1713 100644
--- a/.github/workflows/packaging-wheels.yml
+++ b/.github/workflows/packaging-wheels.yml
@@ -62,7 +62,8 @@ jobs:
         shell: bash
         if: github.ref == 'refs/heads/main' && (github.event.schedule || inputs.upload_artifacts)
         run: |
-          sudo ./ci/scripts/java_jar_upload.sh "$(pwd)"
+          # Preserve env vars so GEMFURY_PUSH_TOKEN gets preserved
+          sudo -E ./ci/scripts/java_jar_upload.sh "$(pwd)"
         env:
           GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}
 
diff --git a/ci/scripts/java_jar_upload.sh b/ci/scripts/java_jar_upload.sh
index ba82237..74b809f 100755
--- a/ci/scripts/java_jar_upload.sh
+++ b/ci/scripts/java_jar_upload.sh
@@ -23,6 +23,11 @@ main() {
     local settings_file=$(mktemp adbc.settingsXXXXXXXX.xml --tmpdir)
     trap 'rm -f "$settings_file"' ERR EXIT INT TERM
 
+    if [[ -z "${GEMFURY_PUSH_TOKEN}" ]]; then
+        echo "GEMFURY_PUSH_TOKEN must be set"
+        exit 1
+    fi
+
     pushd "${source_dir}/java"
 
     cat <<SETTINGS > "${settings_file}"