Automatically download the newest daily build

Code:
---------------
1/5/2017 7:18:27 AM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
KoLmafia-17631.jar is the latest version
Attempting to download http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/artifact/dist/KoLmafia-17631.jar...
Successfully downloaded http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/artifact/dist/KoLmafia-17631.jar
Copying KoLmafia-17631.jar to KoLmafia-latest.jar
Deleting old version KoLmafia-17625.jar
Running KoLmafia-latest.jar...
Dunno what happened for you. It's still running for me today. More information if you want a suggestion besides redownloading from post 103?
 
I haven't really thought about this code in a long time but currently I'm just loading the jenkins api for the last successful build (http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/api/json or http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/api/xml) to get the path to the latest jar. For example in python:

Code:
import json
import urllib2

lastUrl = r'http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild'
data = json.load(urllib2.urlopen(r'%s/api/json' % lastUrl))
jarUrl = r'%s/artifact/%s' % (lastUrl, data['artifacts'][0]['relativePath'])

Hope that's helpful.
 
Last edited:
Latest Update has encountered a problem with the log details below. Last date it successfully ran was 24/05/20.

25/05/2020 7:28:04 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: The remote server returned an error: (503) Server Unavailable.

I miss it so much :D
Thanks and have a great day
 
Looks like some kind of of process on the server had a memory leak and it killed Jenkins. I've gone ahead and restarted the server and it should be back up. Let me know if you have any further issues.
 
Absolutely Fantastic, Thank you so much. It is working fine again. :)
Thank you for your speedy response also. It's very much appreciated.
Now to begin my KoL day. Thanks again. All the best :D

26/05/2020 10:56:59 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
KoLmafia-20133.jar is the latest version
Attempting to download http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/artifact/dist/KoLmafia-20133.jar...
Successfully downloaded http://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild/artifact/dist/KoLmafia-20133.jar
Copying KoLmafia-20133.jar to KoLmafia-latest.jar
Deleting old version KoLmafia-20129.jar
Running KoLmafia-latest.jar...
 
That's fair. I've been doing that since before the forum has existed.
And, if you want access to the latest - or any - version on your own terms, that's what you need to do.
But, for lots of people who don't want to do that, fewyn's service here is actually key.
Thank you so much, fewyn!

(And for people who imagine that "the latest version from Sourceforge is the only one which matters", you are incorrect, but my periodic "official" point builds are all that matters. Thank me, I guess :) )
 
You both rock! I tend to update once a week or so (in fact I just did today "20134" cool number btw!), I grab the "point" releases when they come out, but know they'll get outdated eventually in a week or two so that's when fewyn's awesome service comes in. So yeah, thank you both, I've been playing this game for a really long time, just by myself, and super passively, as in I don't pay much attention to the what's outside happens (like forums and kol community stuff), but I know if mafia didn't exist I still wouldn't be playing still. Ugh, just thinking of you guys quit work on this and having it die... just don't. :P
 
Hi all

Got the dreaded 503 again. Log below.
Thanks for all your great work. I love this addition to KoLmafia.

Cheers,
TaPol

1/06/2020 6:32:23 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: The remote server returned an error: (503) Server Unavailable.
 
Restarted the build server again... I'm going to have to dig into the errors it's been reporting to figure out the issue. Let me know if you have any further issues.
 
Looks like some kind of of process on the server had a memory leak and it killed Jenkins. I've gone ahead and restarted the server and it should be back up. Let me know if you have any further issues.
I would suggesting making a cron job to auto restart the server weekly.
 
Back
Top