fix
This commit is contained in:
parent
36d6914c8c
commit
9302a38e9f
@ -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}
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
1.8.4.fx1,initial version of docker_image_builder.sh
|
||||
1.8.4.fx2,initial version of docker_image_builder.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user