How to sort Hudson builds by last run? (as opposed to last success or last failure) - hudson

I'm trying to get more useful test results for our Hudson build, and I'd like to be able to sort all builds by last run date.
Unfortunately, It seems I can only sort by either last success or last failure.
Is there a way to add this functionality through the base app or via plugin?
Note that I already installed the extra columns plugin, but it doesn't seem to have this functionality.
Thanks

You can view execution history on per-node bases, and that is reverse chronological order.
For the master, goto:
http://<serverurl>/computer/(master)/builds
You can also get there by click on your master node in executor's list and clicking Build History
There is also an RSS feed with the same information:
http://<serverurl>/computer/(master)/rssAll

Related

Make an item display only for certain period of time on the webpage

Hi guys I am constructing a task distribution management system for my team in which I want to add a functionality that:
When I create a task, I will have an option to choose "how long is this task valid for being taken". For example, when creating the task I put "2 hours" in the
<input id="valid-for">
, then this task will only be displayed on the dashboard for 2 hours from the time it was created and then after 2 hours -> "display: none".
I've searched the web for the mechanism of achieving this feature but I didn't get a satisfied answer probably because I don't know the right terminology to google. I tried to use AJAX and use TIME_STAMP type attribute in MySQL but didn't know how to proceed. Could anybody tell me how to achieve this feature by the use of MySQL, jQuery or any other technics that could fulfill this feature? No code necessary I just need some explanation.
Thanks guys!
Without knowing any more details, here is how I would consider writing the code:
In the database, have a start time and a use-by time.
In your browser page, you can run a script periodically, say every minute (this is called polling). In this case, you can use Ajax to call back to the server for updates.
At the server end, check for new tasks as well as expired tasks. Then send the results back to the Ajax caller.
Back at the browser, update the dashboard accordingly.
I would be inclined to remove the task on the browser rather than simply hide it.

Script for counting total pages on website

I am trying to write a script that will check our website everyday for the total amount of web pages we have. How can I do this using an API like Google Analytics? Using JSON would be nice. So here is what it might look like and maybe someone can help please?
{
"startDate": "{date.startOfMonth.format()}",
"endDate": "{date.today}",
"dimensions": ["query","page"]
}
As nyuen has pointed out you cannot count every page in your web presence with Google Analytics. GA will only register pages that a) have GA tracking code and b) have executed this tracking code at least once in your selected timeframe. Usually that's most of the pages, but you can't be sure.
What you can do is issuing a query that queries the page path dimension and at least one metric - pageviews would be obvious. That's not because you actually need the number of pageviews for your purpose, but because a query without at least one metric will not work. Send the query via the API or the query explorer and then simply count the number of rows in the result set. Since the page path is unique the number of results is the number of distinct pages with pageviews in the selected timeframe, which is the closes you will get with GA.
But there are actually tools for what you are trying to do, so you might want to start with those - for example you might have your script make a system call (assuming a linux system) to wget with the --spider option which will create a list of files on a given domain. This does not require tracking code (it works by following links in the pages source code). There is also web spider software like Screaming frog on Windows (doesn't really work in a script, but I guess Windows has some task scheduling tool that allow you to start programs at pre-defined times) which does not only do the counting but also returns information about the health of your site (dead links etc).
Or, since this seems to be your server, you might write a script that traverses the file system and makes a list of the files it encounters there (will not work if your pages are dynamically generated, since this counts only physical files).
Or you write a script that parses your server logs and extracts call to content files (will work only for files that have actually been viewed).
So there are a number of better alternatives to using Google Analytics for that purpose, you might want to look into one of them first.

How do I see the history of my Jenkins build test results?

I've got a collection of Jenkins jobs which are all essentially tests packs - running lots of JUnit tests.
I keep the results for 7 days and, with the aid of the global build stats plugin and build metrics plugin, I can get a percentage of the number of builds (test packs) that had at least one failure in the last week.
What I'm now interested in doing is getting the percentage of all test failures over one week, to get a better idea as to how badly the set of builds failed - was it just one test that caused each build to fail? Or all the tests?. Is it possible with an existing plugin?
I know the data is there because the home page of any of my jobs has a graph on the right where the green area represents test passes and red fails, for all of the previous builds. This gives me some idea, but I'd like a figure to report with.
You may want to take a look at the Unit Test History Generator or Test Results Analyzer plugins.

TortoiseHG/Mercurial Project Statistics and Reports

I've been working for a couple months on cleaning up the backend of a system I'm working on. The previous code was awful so I've been refactoring and rewriting to get the code to a state where I can better add and improve functionality. I want to be able to quantify the work I've done for the client so he can get a sense of how much work has been done. So, I want to run some reports showing things like: number of lines removed, added, changed. I've used TortoiseHG/Mercurial all along and also have pushed the code up to bigbucket.
What's the best way to generate these types of statistics from TortoiseHG/Mercurial or BitBucket?
Churn extension
Activity extension
Chart extension
HG-chart extension
* HGstats, when sphinx.net.ru will be returned back in Net

Hudson - How to configure the number of Jobs in the View-level Build History?

I have a view in my Hudson instance configured with about 300 builds for a given software release. There is a "Build History" link on the left side of the screen, and when I click on it, it lists the 50 most recent jobs built along with a few columns. (Note that I am referring to the Build History for a given view - Not a specific job.)
One of the columns is a status that gives messages, for example "2 more tests are failing". When new tests are failing it also displays the message in red text.
What I am wondering is if it possible to increase the number of jobs that display from 50 to a higher number? Or alternatively is it possible to query these handy status messages elsewhere?
Basically I just want to be able to know the changes in my test status from build to build - when additional tests start failing.