File tree Expand file tree Collapse file tree 3 files changed +34
-4
lines changed
Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,11 @@ jobs:
138138 registry : ghcr.io
139139 username : ${{ github.actor }}
140140 password : ${{ secrets.GITHUB_TOKEN }}
141+ - name : Build Docker image
142+ env :
143+ VCPKG_BINARY_SOURCES : " clear;nuget,GitHub,readwrite"
144+ run : |
145+ docker compose build --pull vcpkg-jni
141146 - name : Cache
142147 uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
143148 with :
Original file line number Diff line number Diff line change 1818ARG base
1919FROM ${base}
2020
21- # Install the libraries required by Gandiva to run
22- # Use enable llvm[enable-rtti] in the vcpkg.json to avoid link problems in Gandiva
23- RUN vcpkg install \
21+ # For --mount=type=secret: The GITHUB_TOKEN is the only real secret
22+ # but we use --mount=type=secret for GITHUB_REPOSITORY_OWNER and
23+ # VCPKG_BINARY_SOURCES too because we don't want to store them into
24+ # the built image in order to easily reuse the built image cache.
25+ #
26+ # Install the libraries required by Gandiva to run. Use enable
27+ # llvm[enable-rtti] in the vcpkg.json to avoid link problems in
28+ # Gandiva.
29+ RUN --mount=type=secret,id=github_repository_owner \
30+ --mount=type=secret,id=github_token \
31+ --mount=type=secret,id=vcpkg_binary_sources \
32+ export GITHUB_REPOSITORY_OWNER=$(cat /run/secrets/github_repository_owner); \
33+ export GITHUB_TOKEN=$(cat /run/secrets/github_token); \
34+ export VCPKG_BINARY_SOURCES=$(cat /run/secrets/vcpkg_binary_sources); \
35+ vcpkg install \
2436 --clean-after-build \
2537 --x-install-root=${VCPKG_ROOT}/installed \
2638 --x-manifest-root=/arrow/ci/vcpkg \
@@ -30,7 +42,8 @@ RUN vcpkg install \
3042 --x-feature=json \
3143 --x-feature=parquet \
3244 --x-feature=gandiva \
33- --x-feature=s3
45+ --x-feature=s3 && \
46+ rm -rf ~/.config/NuGet/
3447
3548# Install Java
3649# We need Java for JNI headers, but we don't invoke Maven in this build.
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ services:
100100 - ${REPO}:${ARCH}-vcpkg-jni-${VCPKG}
101101 args :
102102 base : ${ARROW_REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2-28-vcpkg-${VCPKG}
103+ secrets :
104+ - github_repository_owner
105+ - github_token
106+ - vcpkg_binary_sources
103107 volumes :
104108 - .:/arrow-java:delegated
105109 - ${ARROW_REPO_ROOT}:/arrow:delegated
@@ -111,3 +115,11 @@ services:
111115 command :
112116 ["git config --global --add safe.directory /arrow-java && \
113117 /arrow-java/ci/scripts/jni_manylinux_build.sh /arrow-java /arrow /build/java /arrow-java/jni"]
118+
119+ secrets :
120+ github_repository_owner :
121+ environment : GITHUB_REPOSITORY_OWNER
122+ github_token :
123+ environment : GITHUB_TOKEN
124+ vcpkg_binary_sources :
125+ environment : VCPKG_BINARY_SOURCES
You can’t perform that action at this time.
0 commit comments