Skip to content

Commit

Permalink
gitac/syncer dpkg, dbin
Browse files Browse the repository at this point in the history
  • Loading branch information
huapox committed Dec 2, 2024
1 parent beb7243 commit 636b588
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 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 @@ -21,13 +23,13 @@ function print_time_cost(){
# https://github.com/AliyunContainerService/image-syncer/releases/download/v1.5.5/image-syncer-v1.5.5-linux-arm64.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;
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 +158,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 636b588

Please sign in to comment.