From cc2c07741a03e539b994afae305a7916516cce47 Mon Sep 17 00:00:00 2001 From: Oleg Sheynin Date: Sat, 2 Nov 2024 17:54:16 -0400 Subject: [PATCH] fix --- build/docker_images_builder.sh | 33 ++++++++++++++++++++++++++++++--- release_version.txt | 2 +- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/build/docker_images_builder.sh b/build/docker_images_builder.sh index edc94e5..92432d3 100755 --- a/build/docker_images_builder.sh +++ b/build/docker_images_builder.sh @@ -107,20 +107,24 @@ build_docker_image() { convert_symlink_to_dir() { project=${1} + echo "***** DEBUG 1 $(ls -l ${RootDir}/${project})" if [ -L ${RootDir}/${project} ]; then echo "Converting symlink ${RootDir}/${project} to directory" Cmd="mv ${RootDir}/${project} ${RootDir}/${project}.symlink" echo ${Cmd} && eval ${Cmd} - Cmd="cp -r ${RootDir}/${project}.symlink ${RootDir}/${project}" + src_path=$(readlink -f ${RootDir}/${project}.symlink) + + Cmd="cp -r ${src_path} ${RootDir}/${project}" echo ${Cmd} && eval ${Cmd} fi - if [ -D ${project} ]; then + if [ -d ${project} ]; then echo "${RootDir}/${project} is a Directory" fi Cmd="rm ${RootDir}/${project}.symlink" echo ${Cmd} && eval ${Cmd} + echo "***** DEBUG 2 $(ls -l ${RootDir}/${project})" } image_exists() { @@ -134,6 +138,28 @@ image_exists() { fi } +print_all_reg_images() { + project=${1} + + # Fetch all repositories (images) from the registry + repositories=$(curl -s "${RegistryProtocol}://${RegistryService}/v2/_catalog" | jq -r '.repositories[]') + + # Iterate over each repository to get its tags + for repo in $repositories; do + # Fetch all tags for the repository + tags=$(curl -s "${RegistryProtocol}://${RegistryService}/v2/$repo/tags/list" | jq -r '.tags[]') + + # List each tag + for tag in $tags; do + if [ "${project}" == "" ];then + echo "$repo:$tag" + else + echo "$repo:$tag" | grep ${project} + fi + done + done +} + get_latest_dist_version() { project=${1} @@ -150,6 +176,8 @@ Cmd="${SetVersionScript} docker_dev latest" echo ${Cmd} eval ${Cmd} +convert_symlink_to_dir docker_dev + echo "${DIMAGES_CONFIG}" | jq -c 'to_entries[]' | while IFS= read -r item; do # Extract key (name) and values title=$(echo "$item" | jq -r '.key') @@ -169,4 +197,3 @@ eval ${Cmd} #=============================================================================== #=============================================================================== - diff --git a/release_version.txt b/release_version.txt index 183d348..766ec3e 100644 --- a/release_version.txt +++ b/release_version.txt @@ -1 +1 @@ -1.8.4.fx1,initial version of docker_image_builder.sh +1.8.4.fx2,initial version of docker_image_builder.sh