Skip to content

Commit 0c12487

Browse files
committed
Ensure using the latest image
1 parent d52e397 commit 0c12487

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.github/workflows/rc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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:

ci/docker/vcpkg-jni.dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,21 @@
1818
ARG base
1919
FROM ${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.

compose.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)