Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: update downloads binary scripts #11873

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 2 additions & 3 deletions dm/tests/download-compatibility-test-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ main() {

# Define download URLs
local download_urls=(
"${FILE_SERVER_URL}/download/builds/pingcap/tidb/${tidb_sha1}/centos7/tidb-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/tidb/${tidb_branch}/${tidb_sha1}/linux-amd64/tidb-server.tar.gz"
"http://download.pingcap.org/tidb-enterprise-tools-nightly-linux-amd64.tar.gz"
"http://download.pingcap.org/tidb-enterprise-tools-latest-linux-amd64.tar.gz"
"${GITHUB_RELEASE_URL}/gh-ost-binary-linux-20200828140552.tar.gz"
Expand All @@ -95,8 +95,7 @@ main() {
download "$url" "$filename" "${TEMP_DIR}/${filename}"
case "$filename" in
tidb-server.tar.gz)
extract "$filename" "$THIRD_BIN_DIR" "bin/tidb-server"
mv "${THIRD_BIN_DIR}/bin/tidb-server" "$THIRD_BIN_DIR/"
extract "$filename" "$THIRD_BIN_DIR" "tidb-server"
;;
tidb-enterprise-tools-nightly-linux-amd64.tar.gz)
extract "$filename" "$THIRD_BIN_DIR" "tidb-enterprise-tools-nightly-linux-amd64/bin/sync_diff_inspector"
Expand Down
20 changes: 8 additions & 12 deletions dm/tests/download-integration-test-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ main() {

# Define download URLs
local download_urls=(
"${FILE_SERVER_URL}/download/builds/pingcap/tidb/${tidb_sha1}/centos7/tidb-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/tikv/${tikv_sha1}/centos7/tikv-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/pd/${pd_sha1}/centos7/pd-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/tidb-tools/${tidb_tools_sha1}/centos7/tidb-tools.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/tidb/${tidb_branch}/${tidb_sha1}/linux-amd64/tidb-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/tikv/${tikv_branch}/${tikv_sha1}/linux-amd64/tikv-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/pd/${pd_branch}/${pd_sha1}/linux-amd64/pd-server.tar.gz"
"${FILE_SERVER_URL}/download/builds/pingcap/tidb-tools/master/${tidb_tools_sha1}/linux-amd64/tidb-tools.tar.gz"
"${GITHUB_RELEASE_URL}/gh-ost-binary-linux-20200828140552.tar.gz"
"${FILE_SERVER_URL}/download/minio.tar.gz"
)
Expand All @@ -94,20 +94,16 @@ main() {
download "$url" "$filename" "${TEMP_DIR}/${filename}"
case "$filename" in
tidb-server.tar.gz)
tar -xz -C "$THIRD_BIN_DIR" bin/tidb-server -f "${TEMP_DIR}/${filename}"
mv "${THIRD_BIN_DIR}/bin/tidb-server" "$THIRD_BIN_DIR/"
tar -xz -C "$THIRD_BIN_DIR" tidb-server -f "${TEMP_DIR}/${filename}"
;;
pd-server.tar.gz)
tar -xz -C "$THIRD_BIN_DIR" 'bin/*' -f "${TEMP_DIR}/${filename}"
mv "${THIRD_BIN_DIR}/bin/"* "$THIRD_BIN_DIR/"
tar -xz -C "$THIRD_BIN_DIR" pd-server -f "${TEMP_DIR}/${filename}"
;;
tikv-server.tar.gz)
tar -xz -C "$THIRD_BIN_DIR" bin/tikv-server -f "${TEMP_DIR}/${filename}"
mv "${THIRD_BIN_DIR}/bin/tikv-server" "$THIRD_BIN_DIR/"
tar -xz -C "$THIRD_BIN_DIR" tikv-server -f "${TEMP_DIR}/${filename}"
;;
tidb-tools.tar.gz)
tar -xz -C "$THIRD_BIN_DIR" 'bin/sync_diff_inspector' -f "${TEMP_DIR}/${filename}"
mv "${THIRD_BIN_DIR}/bin/sync_diff_inspector" "$THIRD_BIN_DIR/"
tar -xz -C "$THIRD_BIN_DIR" sync_diff_inspector -f "${TEMP_DIR}/${filename}"
;;
minio.tar.gz | gh-ost-binary-linux-20200828140552.tar.gz)
tar -xz -C "$THIRD_BIN_DIR" -f "${TEMP_DIR}/${filename}"
Expand Down
23 changes: 13 additions & 10 deletions scripts/download-integration-test-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ download_binaries() {
local tiflash_sha1=$(echo "$tiflash_branch_sha1" | cut -d':' -f2)

# Define download URLs
local tidb_download_url="${FILE_SERVER_URL}/download/builds/pingcap/tidb/${tidb_sha1}/centos7/tidb-server.tar.gz"
local tikv_download_url="${FILE_SERVER_URL}/download/builds/pingcap/tikv/${tikv_sha1}/centos7/tikv-server.tar.gz"
local pd_download_url="${FILE_SERVER_URL}/download/builds/pingcap/pd/${pd_sha1}/centos7/pd-server.tar.gz"
local tiflash_download_url="${FILE_SERVER_URL}/download/builds/pingcap/tiflash/${tiflash_branch}/${tiflash_sha1}/centos7/tiflash.tar.gz"
local tidb_download_url="${FILE_SERVER_URL}/download/builds/pingcap/tidb/${tidb_branch}/${tidb_sha1}/linux-amd64/tidb-server.tar.gz"
local tikv_download_url="${FILE_SERVER_URL}/download/builds/pingcap/tikv/${tikv_branch}/${tikv_sha1}/linux-amd64/tikv-server.tar.gz"
# TODO: need pd-ctl binary
local pd_download_url="${FILE_SERVER_URL}/download/builds/pingcap/pd/${pd_branch}/${pd_sha1}/linux-amd64/pd-server.tar.gz"
local tiflash_download_url="${FILE_SERVER_URL}/download/builds/pingcap/tiflash/${tiflash_branch}/${tiflash_sha1}/linux-amd64/tiflash.tar.gz"
local minio_download_url="${FILE_SERVER_URL}/download/minio.tar.gz"
local go_ycsb_download_url="${FILE_SERVER_URL}/download/builds/pingcap/go-ycsb/test-br/go-ycsb"
local etcd_download_url="${FILE_SERVER_URL}/download/builds/pingcap/cdc/etcd-v3.4.7-linux-amd64.tar.gz"
Expand All @@ -152,9 +153,10 @@ download_binaries() {
local schema_registry_url="${FILE_SERVER_URL}/download/builds/pingcap/cdc/schema-registry.tar.gz"

# Download and extract binaries
download_and_extract "$tidb_download_url" "tidb-server.tar.gz" "bin/tidb-server"
download_and_extract "$pd_download_url" "pd-server.tar.gz" "bin/*"
download_and_extract "$tikv_download_url" "tikv-server.tar.gz" "bin/tikv-server"
download_and_extract "$tidb_download_url" "tidb-server.tar.gz" "tidb-server"
# TODO: need pd-ctl binary
download_and_extract "$pd_download_url" "pd-server.tar.gz" "pd-server"
download_and_extract "$tikv_download_url" "tikv-server.tar.gz" "tikv-server"
download_and_extract "$tiflash_download_url" "tiflash.tar.gz"
download_and_extract "$minio_download_url" "minio.tar.gz"
download_and_extract "$etcd_download_url" "etcd.tar.gz" "etcd-v3.4.7-linux-amd64/etcdctl"
Expand All @@ -181,9 +183,10 @@ download_and_extract() {

# Move extracted files if necessary
case $file_name in
"tidb-server.tar.gz") mv ${THIRD_BIN_DIR}/bin/tidb-server ${THIRD_BIN_DIR}/ ;;
"pd-server.tar.gz") mv ${THIRD_BIN_DIR}/bin/* ${THIRD_BIN_DIR}/ ;;
"tikv-server.tar.gz") mv ${THIRD_BIN_DIR}/bin/tikv-server ${THIRD_BIN_DIR}/ ;;
"tidb-server.tar.gz") mv ${THIRD_BIN_DIR}/tidb-server ${THIRD_BIN_DIR}/ ;;
# TODO: need pd-ctl binary
"pd-server.tar.gz") mv ${THIRD_BIN_DIR}/pd-server ${THIRD_BIN_DIR}/ ;;
"tikv-server.tar.gz") mv ${THIRD_BIN_DIR}/tikv-server ${THIRD_BIN_DIR}/ ;;
"tiflash.tar.gz")
mv ${THIRD_BIN_DIR}/tiflash ${THIRD_BIN_DIR}/_tiflash
mv ${THIRD_BIN_DIR}/_tiflash/* ${THIRD_BIN_DIR}/ && rm -rf ${THIRD_BIN_DIR}/_tiflash
Expand Down
Loading