Tag Archive for 'ci'

Page 2 of 2

9 Ways to Dominate Development with Jenkins

Last month, we were proud to co-host another free training webinar with our friends at CloudBees. ‘9 Ways to Dominate Development with Jenkins’ was presented by WANdisco’s Director of Training, Mike Lester, and CloudBees’ Elite Developer and Architect, Ryan Campbell. Mike covered the essentials of setting up Jenkins through uberSVN, the free, open ALM platform for Apache Subversion, before CloudBees’ Ryan Campbell shared a grand total of nine best practices for using Jenkins with uberSVN.

The tips included how best to backup the Jenkins continuous integration server. Webinar attendees were shown how to locate their configuration data in the $JENKINS_HOME directory. The location of this directory varies depending on how you install Jenkins, but in uberSVN you can check this using the Configure Systems screen. To access this screen, simply click on ‘Manage Jenkins’ in the Jenkins tab of uberSVN.

From here, select the ‘Configure Systems’ option.

This will take you to the all-important Jenkins Home directory, which contains the data you will need to backup.

Webinar attendees also learnt that it’s possible to create a backup while Jenkins is running, as Jenkins makes changes atomically to the cloud system. Whenever you change your configuration, Jenkins writes that configuration file to a temporary file and then moves it over atomically at the operating system level, which means creating a backup of a live Jenkins installation isn’t a problem.

The webinar also shared advice for planning disk capacity for Jenkins, the benefits of native installers, adding additional distributed builds to your Jenkins instance, and more.

Missed the webinar the first time around? The good news is that the entire webinar replay is now available to view on-demand, from our Webinar Replay page. And, if you enjoyed ‘9 Ways to Dominate Development with Jenkins,’ you can sign up for more of our upcoming webinars at http://www.wandisco.com/training/webinars.

Subversion Tip of the Week

Admin Best Practices

Apache Subversion users have the freedom to structure their repository according to a project’s particular needs, but if you don’t implement a logical project layout, you’re running the risk of creating an administrative nightmare. Here are some general rules worth bearing in mind when creating a new Subversion repository, to ensure all that freedom doesn’t lead to complications.

  • The code in the trunk should be stable – all experimental development should be confined to separate branches.
  • Consider CI and automated regression testing – these can help ensure there is no regression in the all-important trunk. uberSVN users can download the popular Jenkins open source CI server for free from inside their installation.

  • Make snapshots of your project – tags should be used to make snapshots of your project at certain points during the development process (e.g tagging a snapshot as ‘Release 1.0.’) It is also good practice to make snapshots of your project before implementing major new features. This makes it easier to roll back and effectively ‘undo’ the new feature, if required.
  • Take care when making structural changes – structural changes should always be performed on the trunk, when there are no branches waiting to be merged. This can help development teams avoid serious and time-consuming conflicts.
  • Use changelists – if you are working on several different issues simultaneously, there is a risk of losing track of which files relate to which issue. In these situations, it can be helpful to organize your files into ‘Changelists.’ Changelists can be created either from the commit dialog, or the ‘Check for modifications’ dialog. In this example, we’ll look at creating a changelist from the commit dialog:

1) Highlight the files you wish to place into a changelist, right-click and select ‘Move to changelist.’ In this example, we’ll be creating a new changelist.

2) Enter a name for your changelist and select ‘Ok.’

3) Your modified files will now be automatically organized according to the new changelist. This allows you to see at-a-glance, which modifications have been made for each task, and to commit these changes separately.

Subversion Tip of the Week

Structuring Your Repository

Implementing a logical project layout in Apache Subversion right from the beginning, can save you from administrative hell later. Here are some general rules worth bearing in mind when creating a new Subversion repository, to ensure all that freedom doesn’t lead to complications.

  • The code in the trunk should be stable – all experimental development should be confined to separate branches.
  • Consider continuous integration and automated regression testing – these can help ensure there is no regression in the all-important trunk. uberSVN users can download the popular Jenkins open source CI server for free from inside their installation.
    • Make snapshots of your project – tags should be used to make snapshots of your project at certain points during the development process (e.g. tagging a snapshot as ‘Release 1.0.’) It is also good practice to make snapshots of your project before implementing major new features. This makes it easier to roll back and effectively ‘undo’ the new feature, if required.
    • Take care when making structural changes – structural changes should always be performed on the trunk, when there are no branches waiting to be merged. This can help development teams avoid serious and time-consuming conflicts.

    Mike Lester is WANdisco’s Director of Training. Mike has more than 33 years of experience in the software industry, having spent the past 26 years focusing on training and consulting for Subversion and other software configuration management systems. Mike delivers WANdisco’s free training webinars, and regularly shares his SVN know-how at the WANdisco blog. Mike is also available for Enterprise Training.

Performing your First Jenkins Build in uberSVN

Once you have created some Jenkins jobs performing a build with Jenkins through uberSVN is easy.

1. To start, simply click on the ‘Jenkins’ tab to bring up a list of all the available Jenkins jobs.

2. To start the build, click on the ‘Schedule a build’ icon. To the left-hand side of the screen you will see the build being queued up, followed by an animated bar indicating that a build is in progress.

3. Once a successful build has been completed, click on the number in the ‘Latest Success’ column to view information about the build.

4. On the subsequent page, you can view information such as the exact date and time of the build, who started the build, and how long the build took. To see the list of changes made to this build, click on the ‘(detail)’ link.

5. Here, you can view the list of files that were added, deleted or modified. If you need to, you can modify the information for this build, by clicking on the ‘Edit Build Information’ link.

6. On this page, you can change the build’s display name, and add a description. When you are happy with your changes, click the ‘Save’ button.

7. You will automatically be taken to the build page, where you will see the information has been updated.

8. You also have the option of tagging successful builds from this page. To create a new tag, click ‘Tag this build.’

9. On this page, you must enter the URL where you want the new tag to be created, and can add an optional commit comment. When you have entered all the necessary information, click ‘Tag.’ Your tag will now be created at the specified URL.

10. When you browse your repository in uberSVN, you’ll see the tag you have just created. You have now performed your first build in Jenkins, and successfully tagged that build in Subversion!

Jenkins is available for free through uberSVN. Visit http://www.ubersvn.com/ now to download uberSVN. A professional support option for Jenkins is also available.