Plastic SCM Plug-in for Hudson CIIn this blog post we will go through the very basic steps to setup Plastic SCM Plug in for Hudson CI and do some builds.
The Plastic SCM plug in developed for Hudson CI is basically an .hpi file which will be included in the HUDSON repository (working on it).
However, you can download the plug in from this link: Download_PlasticSCM_Plugin_for_Hudson
Just unzip the hpi file into .hudson/plugins, restart the server, and it should work.
For this Blog post my setup involves the following software:
- OpenSuse 11.1_x86
- Plastic SCM version 220.127.116.11
- Hudson CI ver. 1.384 (also tried it with 1.398)
- gcc-c++ ver. 4.3 (use it for compiling the Hello World sample with Hudson)
- Test files you can download from this link: Download_Test_Files
Create a Plastic workspace and extract the test files into the directory of the workspace.
The test files are basically two files, a helloworld.cpp and a script file BuildHello that calls the g++ compiler and compiles helloworld.cpp. Add the files to Plastic SCM so they are controlled, as illustrated in figure1.
Now into Hudson:
Log into Hudson, in my setup: http://localhost:8080/
Navigate to Manage Hudson-->Manage plugins-->Installed (choose Installed Tab)
Illustrated in figure2
Figure 2Plastic SCM Plug in should be in the list and enabled. (double checking here :-))
Plastic SCM plug in does not differ much from the other Hudson Plug ins, so let us create a project and do some builds.
- New Job-->Job name: PlasticSCM_prj1-->Build a free-style software project-->OK
- Next page we will configure Source Code Managment-->Plastic SCM-->Selector (Insert Plastic SCM workspace selector, fig 4+5)
- Selector can be obtained by many ways, this is just one of them.
- CD to your workspace directory ex.cd \millerwks\prj1\
- execute cm showselector (cm ss) ex. \millerwks\prj1\cm ss
- Selector will be printed and could look like this example:
- On the same page under the Build-->Execute shell-->Command (Insert the name of the shell script BuildHello, fig 6)
And now we are ready to do a "manual build" without triggers, so go ahead and push the button Build Now as indicated in fig 7.
Well, after pushing the Build Now (for many times), I get Build failed which is not cool! lets try to find out what is causing the failing of this build.
In the Build History on the left I entered into the latest build, and clicked on Concole Output. see fig 8.
Ok, cannot find the build script Buildhello, checking figure 1 with figure 6, I inserted the name of the script wrongly, Buildhello instead of the correct BuildHello. So I go to the configuration of the project within Hudson and fix the name, as in fig 9.
A manual build now and things looks much better, fig 10 + 11
And it is by time we try if our hello program built correctly as illustrated in fig 12.