Skip to content

Commit

Permalink
modified jenkins and push script
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishsingh101 committed Mar 9, 2024
1 parent 41432bf commit e434a28
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ pipeline {
echo "starting s3 push .........................."
def s3Path = "s3://beckn-frontend-assets/${file}"

sh ("./push.sh ${file} ${s3Path}")
// sh "cp ./push.sh ."
sh "chmod +x ./push.sh"
sh ("./push.sh ${file}")
// sh ("aws s3 cp ./${file} ${s3Path}")

uploadedFiles += "\n${file}"
Expand Down
16 changes: 10 additions & 6 deletions push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ check_if_png_is_valid()
{
local_path="$1"
printf "check_if_png_is_valid local_path : $local_path"
if pngcheck "$local_path"
then
image_name=$(echo $local_path | rev | cut -d"/" -f1 | rev)
if [[ "$image_name" =~ ^([a-z0-9]|_)*(\.9)?\.png$ ]]
then return 0
else return 1; fi
# if pngcheck "$local_path"
# then
# image_name=$(echo $local_path | rev | cut -d"/" -f1 | rev)
# if [[ "$image_name" =~ ^([a-z0-9]|_)*(\.9)?\.png$ ]]
# then return 0
# else return 1; fi
# else return 1; fi
image_name=$(echo $local_path | rev | cut -d"/" -f1 | rev)
if [[ "$image_name" =~ ^([a-z0-9]|_)*(\.9)?\.png$ ]]
then return 0
else return 1; fi
}

Expand Down

0 comments on commit e434a28

Please sign in to comment.