Hudson Integration with ClearCase on linux box [message #1692214] |
Tue, 14 April 2015 07:11  |
Eclipse User |
|
|
|
Hi,
I am trying to create Hudson build environment on Linux operating system and integrating with ClearCase. I have configured the clearcase config spec to create the snapshot view and with view name as ${USER_NAME}_${NODE_NAME}_${JOB_NAME}_hudson .
When I start the build, the hudson server is trying to create the view by calling cleartool command with username "hudson", but this doesn't exist. Hence I am getting the below exception.
[workspace] $ /opt/ibm/RationalSDLC/clearcase/linux_x86/bin/cleartool mkview -snapshot -tag hudson_master_Test1-Build_hudson view
Selected Server Storage Location "view_storage".
cleartool: Error: Unable to create directory "/scfs3/vws_u/hudson/view": Permission denied.
FATAL: Base ClearCase failed. exit code=1
java.io.IOException: cleartool did not return the expected exit code. Command line="mkview -snapshot -tag hudson_master_Test1-Build_hudson view", actual exit code=1
I want to run the cleartool command with the different usernamewhich has all privileges.
So can you guide me for the right direction to configure this.
Thanks, Venugopal
|
|
|
|
Re: Hudson Integration with ClearCase on linux box [message #1692319 is a reply to message #1692297] |
Wed, 15 April 2015 02:33   |
Eclipse User |
|
|
|
Hi Winston Prakash,
Thanks for your quick response on my post.
Yes, I already have updated the /etc/init.d/hudson and /etc/sysconfig/hudson files
and changed the environment variables as below
HUDSON_USER="hpcmunix"
HUDSON_GROUP="ccworld".
And I restarted the hudson server, but still when I run the build, it is trying to call the "cleartool mkview" command with the user name "hudson".
while configuring the view, I used a variable names ${USER_NAME},${NODE_NAME},${JOB_NAME} for my view tag.
as per the build log, USER_NAME, NODE_NAME, JOB_NAME got replaced with hudson, master, Test1-Build respectively. I know variable "NODE_NAME", and "JOB_NAME" where ther are defined. But not sure, from where the variable USER_NAME got replaced with the value "hudson". I also created global variable "USER_NAME" with value "hpcmunix" and re started the build, but still it was not reflected.
I hope, it may resolve this issue if we know how does the hudson build replace the variable "USER_NAME" with its default value "hudson".
Thanks, Venu Gopal
|
|
|
Re: Hudson Integration with ClearCase on linux box [message #1692762 is a reply to message #1692319] |
Fri, 17 April 2015 13:26  |
Eclipse User |
|
|
|
USER_NAME is not set by Hudson core only "USER" is set. May be USER_NAME is set by the builder you use. Go to Manage Hudson -> System Information to see all Environment variables set by Hudson core.
You can write a small groovy script to display all Build Parameters in the job console
- install groovy on machine
- install groovy plugin
- in your job use 'Execute system Groovy script' and add groovy script
import hudson.model.*
def build = Thread.currentThread().executable;
println "Build parameters: "+ build.getEnvVars();
This will print all parameters to the console when the job runs.
|
|
|
Powered by
FUDForum. Page generated in 0.03725 seconds