Skip to content

Commit

Permalink
fix: default dest_registry
Browse files Browse the repository at this point in the history
Signed-off-by: ygqygq2 <[email protected]>
  • Loading branch information
ygqygq2 committed Jun 18, 2024
1 parent a71673d commit 87ed98b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker-image-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ jobs:
- name: Sync image
id: syncImage
env:
DEST_HARBOR_URL: ${{ vars.DEST_HARBOR_URL }}
shell: bash
run: |
echo DEST_HARBOR_URL $DEST_HARBOR_URL
bash jenkins_sync_docker_images.sh docker_images.list
- name: Success check
Expand Down
8 changes: 5 additions & 3 deletions jenkins_sync_docker_images.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env bash
set -x

cd "$(dirname "$0")" || return 1
SH_DIR=$(pwd)
ME=$0
PARAMETERS=$*
config_file="$1"
dest_repo="${DEST_HARBOR_URL}/${DEST_HARBOR_REGISTRY}" # 包含仓库项目的名字
dest_registry="${DEST_HARBOR_REGISTRY}"
dest_registry="${DEST_HARBOR_REGISTRY:-library}"
dest_repo="${DEST_HARBOR_URL}/${dest_registry}" # 包含仓库项目的名字
thread=3 # 此处定义线程数
faillog="./failure.log" # 此处定义失败列表,注意失败列表会先被删除再重新写入
echo >> "$config_file" # 加行空行
Expand Down Expand Up @@ -233,7 +234,8 @@ function multi_process () {
exec 6>&- # 关闭df6
}

have_skopeo=$(check_skopeo)
check_skopeo
have_skopeo=$?
multi_process

if [ -f $faillog ];then
Expand Down

0 comments on commit 87ed98b

Please sign in to comment.