Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mfaizanse committed Jan 16, 2024
1 parent 8b99e97 commit c2623e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/extract_image_from_build_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ curl -s -L -o prow-html.html $(echo ${COMMIT_STATUS_JSON} | jq -r '.target_url')
## define the log file url.
LOGS_FILE_URL="$(cat prow-html.html | grep ">Artifacts</a>" | awk -F'"' '{print $2}')/build-log.txt"

### Download the build logs.
### Download the build logs and extract the image name from build logs.
echo "Downloading build logs from: ${LOGS_FILE_URL}"
curl -s -L -o build-log.txt ${LOGS_FILE_URL}

## extract the image name from build logs.
export IMAGE_NAME=$(cat build-log1.txt | grep "Successfully built image:" | awk -F " " '{print $NF}')
export IMAGE_NAME=$(cat build-log.txt | grep "Successfully built image:" | awk -F " " '{print $NF}')

## validate if image exists
echo "Validate that image: ${IMAGE_NAME} exists.."
Expand Down

0 comments on commit c2623e2

Please sign in to comment.