Jose Sa commented on Bug JENKINS-17265

Both "/api/json?tree=builds[number]" and "/rssAll" job urls seem to be returning only latest builds (not all as expected), like I wrote above this could be a symptom for this case.

Luckily "/buildHistory/all" does still provide all visible builds, so I was able to create created a bash script to help automatically to check for this kind of problems and provide a text report.

# Assuming some host specific variables
jenkins_url=https://localhost:8080
jobs_dir=/work/jenkins/jobs

# This should work for any unix environment using bash
for job_dir in ${jobs_dir}/*; do
    job=$(basename ${job_dir})
    echo "Checking $job..." >&2
    job_url=${jenkins_url}/job/${job}
    wget -q --no-check-certificate -O all ${job_url}/buildHistory/all
    gawk -F'#' '/ #/{print $2}' all > online_builds
    find ${jobs_dir}/${job}/builds/* * -type l ! -name "last*" -prune | sed "s,${jobs_dir}/${job}/builds/,,g" > local_builds
    missing=$(gawk '
    BEGIN {first_file = ""}
    {
        if (first_file == "") first_file = FILENAME
        if (first_file == FILENAME) {build_list[$1]=1} else {delete build_list[$1]}
    }
    END {for (build in build_list) print build}
    ' local_builds online_builds)
    [ ! -z "${missing}" ] && echo Job $job missing builds: $missing
done | tee missing_builds.txt

I found out that after 3 days online, 85 (out of 1406) jobs are showing missing builds varying from a few to all.

I have FreeStyle and MultiJob types and they both show this problem.
We are using mixed ClearCase and SVN (both showing same problems)
Server is Solaris 10 Sparc, having slaves on HP-UX, Windows (XP, 2k3, 7), RHEL (5, 6), Solaris.
Running Jenkins from war file, currently with 1.505 (but noticing this problem since 1.485)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to