Skip to content

Commit 150fa2a

Browse files
committed
ci: download iceberg test binaries via OCI artifacts
1 parent 26c641f commit 150fa2a

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

.github/workflows/integration_test_iceberg.yaml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,65 @@ jobs:
6161
unzip \
6262
wget
6363
64-
- name: Prepare integration test third-party binaries (community)
64+
- name: Install OCI download tools
6565
run: |
66-
make prepare_test_binaries community=true ver=v8.5.5 os=linux arch=amd64
66+
set -euo pipefail
67+
ORAS_VERSION="1.2.0"
68+
YQ_VERSION="4.44.3"
69+
curl -fsSL "https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz" -o /tmp/oras.tar.gz
70+
sudo tar -xzf /tmp/oras.tar.gz -C /usr/local/bin oras
71+
sudo chmod +x /usr/local/bin/oras
72+
curl -fsSL "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64" -o /tmp/yq
73+
sudo mv /tmp/yq /usr/local/bin/yq
74+
sudo chmod +x /usr/local/bin/yq
75+
76+
- name: Prepare integration test third-party binaries (OCI)
77+
env:
78+
OCI_ARTIFACT_HOST: us-docker.pkg.dev/pingcap-testing-account/hub
79+
OCI_TAG_PD: v8.5.5
80+
OCI_TAG_TIDB: v8.5.5
81+
OCI_TAG_TIKV: v8.5.5
82+
OCI_TAG_TIFLASH: v8.5.5
83+
OCI_TAG_SYNC_DIFF_INSPECTOR: master
84+
OCI_TAG_MINIO: RELEASE.2025-07-23T15-54-02Z
85+
OCI_TAG_ETCD: v3.5.15
86+
OCI_TAG_YCSB: v1.0.3
87+
OCI_TAG_SCHEMA_REGISTRY: latest
88+
run: |
89+
set -euo pipefail
90+
script="${RUNNER_TEMP}/download_pingcap_oci_artifact.sh"
91+
curl -fsSL "https://raw.githubusercontent.com/PingCAP-QE/ci/main/scripts/artifacts/download_pingcap_oci_artifact.sh" -o "$script"
92+
chmod +x "$script"
93+
python - "$script" <<'PY'
94+
import pathlib
95+
import sys
96+
97+
path = pathlib.Path(sys.argv[1])
98+
text = path.read_text()
99+
needle = 'mv -v "$tarball_file" "$file_path"'
100+
replacement = 'if [[ "$tarball_file" != "$file_path" ]]; then mv -v "$tarball_file" "$file_path"; fi'
101+
if needle not in text:
102+
raise SystemExit("failed to patch download script: target not found")
103+
path.write_text(text.replace(needle, replacement))
104+
PY
105+
mkdir -p bin
106+
pushd bin
107+
"$script" \
108+
--pd="${OCI_TAG_PD}" \
109+
--pd-ctl="${OCI_TAG_PD}" \
110+
--tikv="${OCI_TAG_TIKV}" \
111+
--tidb="${OCI_TAG_TIDB}" \
112+
--tiflash="${OCI_TAG_TIFLASH}" \
113+
--sync-diff-inspector="${OCI_TAG_SYNC_DIFF_INSPECTOR}" \
114+
--minio="${OCI_TAG_MINIO}" \
115+
--etcdctl="${OCI_TAG_ETCD}" \
116+
--ycsb="${OCI_TAG_YCSB}" \
117+
--schema-registry="${OCI_TAG_SCHEMA_REGISTRY}"
118+
ls -d tiflash
119+
mv tiflash tiflash-dir
120+
mv tiflash-dir/* .
121+
rm -rf tiflash-dir
122+
popd
67123
make check_third_party_binary
68124
69125
- name: Build TiCDC binaries for integration tests

0 commit comments

Comments
 (0)