1

I am trying to integrate Jenkins with a UCM ClearCase environment and I have a problem during the build.

First, I created a -recommended baseline on my integration stream and rebased this one on my dev stream.

My jenkins job is configured on my integration stream and polling on "child streams"

I added a "#" in a file to make a little change and trigger the build after a poll. After that change I created baseline which will be detected by the plugin.

It seems to works fine until an error which cause the build to fail :

[CCUCM] Getting snapshotview
[CCUCM] Updating view using all modules.
java.io.IOException: Error while retrieving changes
    at net.praqma.hudson.remoting.deliver.GetChanges.invoke(GetChanges.java:49)
    at net.praqma.hudson.remoting.deliver.GetChanges.invoke(GetChanges.java:21)
    at hudson.FilePath.act(FilePath.java:981)
    at hudson.FilePath.act(FilePath.java:959)
    at net.praqma.hudson.scm.CCUCMScm.generateChangeLog(CCUCMScm.java:563)
    at net.praqma.hudson.scm.CCUCMScm.checkout(CCUCMScm.java:246)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1265)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
    at hudson.model.Run.execute(Run.java:1759)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1949)
    at java.lang.String.substring(String.java:1916)
    at net.praqma.clearcase.ucm.entities.Activity$Parser.parse(Activity.java:275)
    at net.praqma.hudson.remoting.deliver.GetChanges.invoke(GetChanges.java:43)
    ... 13 more
Processing baseline
[CCUCM] Build result: FAILURE
[CCUCM] Cancelling the deliver. Cancelling
Failed.
[CCUCM] Performing common post build steps
[CCUCM] Build failed.

If i don't create a new baseline after a change and I change an old baseline at "INITIAL" level, the build is successful but the changes are not delivered since the old baseline does not contains the last changes.

Is someone have an idea about this problem ?

Billyjones
  • 11
  • 2

1 Answers1

0

There can be many possible causes for your problem but there seems to be a problem to deliver from the child stream to the target integration stream. To find out what causes the problem, you might want to perform the Clearcase deliver operation manually, i.e. launch the deliver from a view on the source stream to the destination stream. Try using similar conditions:

-snapshot view

-same length of path to the snapshot root view folder (just in case you reach the 255 character limitation if you are on Windows)

Possibles reasons are:

1) An element cannot be delivered because it cannot be checked out in the destination view. This could be due to permission issue, due to the fact that it is already checked out on the stream but in another view, or due to the fact that some elements are beyond 255 characters in terms of path.

2) A manual merge is required for an element at delivery time.

If you use a version of plugin older than 1.2.0, you can set the log level ccucm_loglevel at DEBUG mode. If you use 1.2.0 plugin or later, you might find Another way to investigate is also to set

iclman
  • 1,218
  • 9
  • 21
  • Jenkins ClearCase UCM plugin created a snapshot view in the job workspace but I don't exactly understand what it's doing when the build is triggered. When Jenkins detects a new baseline on my dev stream, it seems that he is scanning the integration stream workspace but does not detect the dev stream changes to deliver them in the integration. Do you have an idea of what jenkins is doing when configured in child stream polling ? – Billyjones Feb 11 '15 at 12:54
  • Normally it performs a "cleartool deliver -baseline" from the source stream to the target stream. Have you checked the promotion level of the baseline on the source stream ? It is in a REJECTED level, the plugin is not supposed to perform the delivery. Also, if you can have access to more logs in order to see what is done, it would be nice. Aside from the Jenkins logs, you might want to check the Clearcase logs. They can be found in /var/adm/atria/log (for Linux / Unix). You have to look at them on the view server for the view_server logs. The albd_log on the vob server can also be useful. – iclman Feb 11 '15 at 20:04
  • When I perform a change and a "cleartool mkbl" after this change, the baseline created on the component where the change occured is in a INITIAL level. Jenkins is detecting this baseline but can't "retrieve the changes" as it is said in the console output. In the logging, it seems that the plugin want to cancel an non-existent deliver so that throws an error. I found the error message in this code : https://github.com/jenkinsci/clearcase-ucm-plugin/blob/master/src/main/java/net/praqma/hudson/remoting/deliver/GetChanges.java but I can retrieve what can trigger the exception. – Billyjones Feb 16 '15 at 10:19
  • Fixed with jenkins new release 1.599. Thanks For help ! – Billyjones Feb 17 '15 at 09:56