I recently start to work a lot with Amazon AWS by utilizing EC2 servers and using S3 as online storage. While you should do your maths using the servers to generously (it quickly becomes expensive if you create instances on the fly and keep them running), S3 usage is a rather innocent matter. Currently 1GB costs you 0.15 U$ per month (more details here), but please dont forget to look at data transfer charges as well (not longer free from November 2010). I use the service mainly for backup purpose, while I still rely on local backups once a month, the continuous backup happens on S3 (which might be safer than my backup harddisk). The data volume I transfer is small enough (not maintaining a filesharing server !) to keep the costs low.
I was looking for a way to transfer my Hudson artifacts to my S3 account and could not find a regular promoted plugin, almost creating a manual script as workaround, until I found a plugin, which you still need by yourself, but works perfectly. This tutorial (based on Ubuntu) is a hands-on walk-through from the scratch. Some steps are rather simple.
In this previous tutorial I described my approach of using artifacts as a backup media.
Update 2010-10-04: There is another updater in github who added functionality to the plugin: here the address git://github.com/d6y/hudson-s3.git
Pre-requisites:
- A running Hudson instance. You can download it from here and run it from on local machine (java -jar hudson.war) for testing purpose.
- An Amazon AWS account (create it here)
- A sample project on a svn server (like in the previous tutorial)
- The Apache Build Manager Maven. Don’t have it ? sudo apt-get install maven2 (up to 270MB depending what packages you have pre-installed)
- A GIT sourcecode version control client. Don’t have it ? sudo apt-get install git git-core
Tutorial Step 1 (Preparation of S3)
- You need to activate the S3 service in your AWS account if you haven’t done yet.
- Create a bucket (kind of a container for files in S3). Note this buckets are NOT public. No one can touch our files.
- Take not of your access key and secret access key (Account|Security Credential|Access Keys)
Tutorial Step 2 (Build the plugin)
- This is straight forward and simple, following the instructions from http://github.com/dougm/hudson-s3
- Create a folder and get the sourcecode (git clone git://github.com/d6y/hudson-s3.git , original source clone http://github.com/dougm/hudson-s3.git)
- Open the folder and move the file and execute mvn
- You should have a s3.hpi file now. Copy it to your ~/.hudson/plugins folder
Tutorial Step 3 (Configure Hudson and project)
- Start Hudson (java -jar hudson.war) and goto Manage Hudson|Configure System
Enter your S3 access credentials - Configure your project
For the filenames and location the same logic applies as for saving artifacts.
- Build the project
Thanks to Doug MacEachern for the plugin !








Hi, one question on the S3 plugin. When published to S3, are the URLs on the Hudson project page for Build Artifacts now pointing to the files on S3? Or is this S3 plugin simply archiving a copy of the build artifacts?
Comment by Tim — September 14, 2011 @ 10:24 am |
No link, just a simple upload.
Comment by devdude — September 15, 2011 @ 8:52 pm |
[...] About one year back I found this plugin, that saves your build artifacts to Amazon S3 storage. Unfortunately the plugin does not properly work with the current Jenkins versions and the original plugin is not maintained. Luckily someone forked and updated the plugin at github. You need to build the plugin by yourself with the help of maven, you still can refer to my original post, just one change is required to make it work, the settings for your ~/.m2/settings/xml need to be changed according to the plugin page description. Please be patient, maven is going to download a lot ! [...]
Pingback by Amazon S3 plugin for Jenkins CI « The JavaDude Weblog — November 1, 2011 @ 9:53 pm |