Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
huapox committed Dec 6, 2024
1 parent 252ed6a commit 1609601
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/syncer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set +e
# rm -f /bin/sh; ln -s /bin/bash /bin/sh #deb,ubt; >>>>送错参
# source ../../compile/src/common.sh #print_time_cost
logfile=$cur/oneBuild-syncer.log
dpkg=$cur/.ws/down_pkg
dbin=$cur/.ws/down_bin; mkdir -p $dpkg $dbin
function print_time_cost(){
local item_name=$1
local begin_time=$2
Expand All @@ -19,15 +21,16 @@ function print_time_cost(){
# ref quickstart-imgdeploy//imgpackage/2syncer.sh
# https://github.com/AliyunContainerService/image-syncer/releases/download/v1.5.5/image-syncer-v1.5.5-linux-amd64.tar.gz
# https://github.com/AliyunContainerService/image-syncer/releases/download/v1.5.5/image-syncer-v1.5.5-linux-arm64.tar.gz
# https://gitee.com/g-golang/fk-undock/releases/download/v24.12/xx-bins.tar.gz
function loadBins(){
file=image-syncer-v1.5.5-linux-amd64.tar.gz; URL=https://github.com/AliyunContainerService/image-syncer/releases/download/v1.5.5/$file
curl -O -k -fSL $URL;
file=image-syncer-v1.5.5-linux-amd64.tar.gz; URL=https://gitee.com/g-golang/fk-undock/releases/download/v24.12/$file
curl -o- -k -fSL $URL > $dpkg/$file;
# view
echo "cur: $cur"; pwd;
ls -lh
ls -lh $dpkg/

tar -zxf $file #-C ./ #$cur/
ls -lh
tar -zxf $dpkg/$file -C $dbin/
ls -lh $dbin/
}
loadBins

Expand Down Expand Up @@ -156,7 +159,7 @@ EOF
# begin_time="`gawk 'BEGIN{print systime()}'`"
begin_time="`awk 'BEGIN{print systime()}'`"
# --arch=amd64 --arch=arm64 #--arch amd64,arm64
./image-syncer --proc=3 --force --auth=./conf/auth.yaml --images=./conf/images.yaml --retries=3
$dbin/image-syncer --proc=3 --force --auth=./conf/auth.yaml --images=./conf/images.yaml --retries=3
print_time_cost "sync-ali[$src>$dst]" $begin_time >> /tmp/.timecost #tee -a
}

Expand Down

0 comments on commit 1609601

Please sign in to comment.