Hello There,
We are using nexus 3.69 , we want to investigate what has been uploaded on day so that we can verify and remove unwanted artifacts.
Use case : to check data uploaded on nexus on specific date (example Yesterday)
Any way from UI ?
Any way from command line ?
Any way from orientdb ?
I have this script but it will take time to get data
!/bin/bash
Configuration
REPO=“YOUR_REPOSITORY_NAME”
NEXUS_URL=“http://YOUR_NEXUS_SERVER/service/rest/v1/components?repository=$REPO”
OUTPUT_FILE=“components.json”Fetch data from Nexus
curl -u YOUR_USERNAME:YOUR_PASSWORD “$NEXUS_URL” -o “$OUTPUT_FILE”
Get yesterday’s date in the required format
YESTERDAY=$(date -d “yesterday” +%Y-%m-%d)
Filter components created yesterday
echo “Components uploaded on $YESTERDAY:”
jq --arg date “$YESTERDAY” ’
.items | select(.created | startswith($date)) | {name: .name, version: .version, created: .created}
’ “$OUTPUT_FILE”
Please guide,
Regards
SAM