Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Hudson Integration with ClearCase on linux box(Getting issues with Hudson configuration with ClearCase on linux box)
Hudson Integration with ClearCase on linux box [message #1692214] Tue, 14 April 2015 11:11 Go to next message
Venugopal Kodumagulla is currently offline Venugopal KodumagullaFriend
Messages: 3
Registered: April 2015
Junior Member
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 #1692297 is a reply to message #1692214] Tue, 14 April 2015 21:38 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
I believe you have installed Hudson using RPM which installs with user "hudson". If so if you find the init script, it uses a config which defines the username. You could change it there and restart Hudson.

For example on Redhat

/etc/init.d/hudson (init script)
/etc/sysconfig/hudson (config file)

See more details about Hudson installation on Linux here

http://www.eclipse.org/hudson/the-hudson-book/book-hudson.chunked/ch02.html#section-install-rpm


Winston Prakash
Eclipse Hudson team
Re: Hudson Integration with ClearCase on linux box [message #1692319 is a reply to message #1692297] Wed, 15 April 2015 06:33 Go to previous messageGo to next message
Venugopal Kodumagulla is currently offline Venugopal KodumagullaFriend
Messages: 3
Registered: April 2015
Junior Member
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 17:26 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
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.


Winston Prakash
Eclipse Hudson team
Previous Topic:Hudson v2.2.0 can I manually change config settings?
Next Topic:Mercurial with Cascading Jobs
Goto Forum:
  


Current Time: Fri Apr 26 12:58:39 GMT 2024

Powered by FUDForum. Page generated in 0.04852 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top