Tag SVN “Nightly” Builds with CruiseControl.Net

rajeshkumar created the topic: Tag SVN “Nightly” Builds with CruiseControl.Net
How would I do a nightly or other scheduled build for CruiseControl.NET without having a duplicate project?

In my current config, every 60 seconds, I am checking out the trunk using Subversion, running MSBuild, then either NUnit or MSTest.

I would like to commit back to SVN as a tag, but I don’t want it on every successful build. I want it to make a nightly build or some other set schedule. To me, it seems a bit tedious to have two CruiseControl.Net projects with basically the same options. What is the best way to handle that?

As a bonus, I would like it to build as a release build and commit the binaries in the same tag.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re:Tag SVN “Nightly” Builds with CruiseControl.Net
i’ll tell you how we use ccnet (and we’re quite happy with it that way).

we’ve got 20 projects on the build server and several release branches of previous versions. we only start builds on demand using the cctray application. so after a developer is done implementing a feature, he clicks the “force build” button and ccnet starts to do its thing (build, test, tag, copy build output to a network drive, notify other devs,…).

the advantage is that devs can decide when to start a build. projects that haven’t changed aren’t built. projects with work in progress can be built several commits later, only when a developer thinks that he needs a build.

one idea that comes to mind for starting nightly builds would be to use ccnet’s remoting interface (which is also used by cctray), connect it to the ccnet instance and call the force-build-method at midnight.

concerning “committing binaries to the same tag”:

there is a problem in ccnet that causes it to sometimes tag a revision from the trunk and sometimes to tag the working copy. it does this depending on if there were changes since the last build (in which case it tags the revision from the trunk), or if there were no changes since the last build (in which case it tags the working copy).

this is pretty annoying because you never know what will be committed – in the first case your binaries won’t get committed, in the second case they will.

we have actually patched ccnet ourselves to make it always commit the working copy so we get deterministic behaviour. i have once submitted the patch but it never made it in…
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Release notes for .net builds

rajeshkumar created the topic: Re: Release notes for .net builds
Hi,

I have used Doxygen for C++ and Java based project which is best for these 2 language. But no experience with other 2 tools.

Based on googling i felt that NDOC3 should suite your requirement as its basically for .net and C#….

Please share with us more experience on this…
NDoc3 is based on NDoc, and is a code documentation generation tool for .NET developers. The goal is to make a fast, extensible, multi-platform .NET documentation tool which supports all of the .NET languages specifications including but not only, C#
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Delta Builds ?

saiki created the topic: delta builds ?
Hi,

Can any one give more info on delta builds?

rajeshkumar replied the topic: Re: delta builds ?
Hi Deepak,
Every Project has their own custom definition of build terminology defined. may be in your project the stage of quality of the builds has been defined as a Alpha / Beta / Gamma or Delta.

Each stage has specific purpose i mean may be Delta build is ready for QA or somthing. You need to ask project manager about the definition.

Some of the build definition, you might find in following url.

community.scmgalaxy.com/pg/blog/read/202…velopers-and-project
community.scmgalaxy.com/pg/blog/read/276…uild-in-remote-agent

Generic Meaning of these words….

letter Numeric value

Alpha 1
Beta 2
Gamma 3
Delta 4
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

How to Trigger builds remotely in Jenkins? | Jenkins Tutorials | scmGalaxy

trigger-builds-remotely-in-jenkins
How to Trigger builds remotely in Jenkins?
1. Create a user – You need to create a user in jenkins using you would like to trigger a jenkins jobs from remote loction or script
How to create users in Jenkins?
Manage Jenkins –> Manage Users –> Create User
2. Assign a right privillage to the specific user?
How to assign privillage to the user?
Manage Jenkins –> Configure Global Security –> Enabled “Anyone can do anything”
OR
Manage Jenkins –> Configure Global Security –> Configure “Matrix-based security” for the specific users and assign atleast following Permissions.
Overall – Read
Job – Build
Job – Read
Job – Workspace
3. Find out jenkins user “API Token”
How to find jenkins user “API Token”?
Click on the user name located at top right(e.g http://54.171.140.1:8080/user/admin1/) –> Configure –> Locate the “API Token” section.
4. Enabled “Trigger builds remotely” in Jenkins Job Configuration.
Click on the desired job –> Configure –> Locate the “Trigger builds remotely” under “Build Triggers” Tab
Enabled the check box of “Trigger builds remotely”
Provide some Authentication Token e.g – iFBDOBhNhaxL4T9ass93HRXun2JF161Z
$ Save
5. Formulate the command to run using curl. 
> curl –user userid:API-Token http://IP OR HOST:PORT/job/JOB_NAME/build?token=Authentication_Token
eg.curl –user admin1:91367cf0389eaf89669f74c9963c9fb3 http://54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z
Some of other formats which is being tried in google but need to be tested with specific users. there are working with “Anonymous”
> curl -X POST http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z

> wget http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z

WORKING WITH NEW JENKINS
> wget –auth-no-challenge –user=admin –password=5ad344f0518640f62d0483084bb889bc http://13.126.143.49:8080/job/ANT//build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z

If you are using wget 1.11 against Jenkins version 1.586 and above with the JENKINS-25169 fix, you might need to use the following options:
wget –auth-no-challenge –http-user=user –http-password=apiToken –secure-protocol=TLSv1 http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN

If you are using wget 1.11, you might need to use the following options:
wget –auth-no-challenge –http-user=user –http-password=apiToken http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN

With wget 1.10.x the following is enough (but will not work with 1.11.x) :
wget http://user:apiToken@jenkins.yourcompany.com/job/your_job/build?token=TOKEN

If you are a Windows User!
‘gitbash’ is a program combined of git and bash. A bash is shell that runs commands once you type the name of command and press enter. 🙂
Download  the git bash from here https://git-scm.com/download/win and install it.
Tagged : / / / / / / /

ANT Builds and Subversion (SVN) | Ant integration with Subversion guide

ant-builds-and-subversion

As I have mentioned in a previous blog entry, I have come to love using ANT in my development environment. One of the things that I like about it is how well it integrates with my Subversion repository using SVNAnt. If you are not using either ANT or Subversion, you owe it to yourself and your team to check it out.

Here we’ll go over a simple build script that exports application files from the Subversion repository into a local folder in the CFEclipse project. You can then view the following entry on how to ftp that into your production/staging server.
First we need to make sure that your ANT install has the necessary SVNAnt jar files. You can download them here: http://subclipse.tigris.org/svnant.html. Once you unpack the svnant-1.0.0.zip file, you’ll find three jar files: svnant.jar, svnClientAdapter.jar, svnjavahl.jar. Place them on your
[ANTInstall]/lib* folder.

Once you have the jar files in place, you can define them in your build file’s property section like so:
<!– svnant lib –>
<property name=”svnant.lib” value=”lib” />
<property name=”svnant.jar” value=”${svnant.lib}/svnant.jar” />
<property name=”svnClientAdapter.jar” value=”${svnant.lib}/svnClientAdapter.jar” />
<property name=”svnjavahl.jar” value=”${svnant.lib}/svnjavahl.jar” />
Followed by this path definition after all your properties have been defined:

<!– path to the svnant libraries. Usually they will be located in ANT_HOME/lib –>
<path id=”project.classpath”>
<pathelement location=”${svnjavahl.jar}” />
<pathelement location=”${svnant.jar}” />
<pathelement location=”${svnClientAdapter.jar}” />
</path>

Now all you have left to do is add the following task definition:
<!– load the svn task –>
<taskdef resource=”svntask.properties” classpathref=”project.classpath”/>

Now you are all set! You can now call tasks like the following export target:

<!– define properties –>
<!– svn repo url –>
<property name=”svn.url” value=”http://[mysvnhost]/svn/repo/myprojectFiles/” />
<property name=”svn.exportPath” value=”[yourDirectory]:\\[pathToYourCFEclipseProject\\build” />

<target name=”svn.export”>
<echo message=”Exporting application files from svn repository:” />
<input message=”Please enter svn repo username:” addproperty=”svn.username” />
<input message=”Please enter svn repo password:” addproperty=”svn.password” />
<mkdir dir=”${svn.destPath}” />
<svn username=”${svn.username}” password=”${svn.password}”>
<export srcUrl=”${svn.url}” destPath=”${svn.exportPath}” revision=”HEAD” />
</svn>
<echo message=” … finished exporting files.” />
</target>

That’s it. No more running command line tasks to get your subversion commands. For additional info and other SVN tasks you can go to http://subclipse.tigris.org/svnant/svn.html

Tagged : / / / / / / / / / / / / / / / / / / /