It's all about the answers!

Ask a question

Integration of Jenkins and RTC


1
1
vikrant kamble (1323897) | asked Dec 30 '16, 3:40 a.m.
Hi,
I want to integrate jenkins with RTC to execute builds. I am refering this wiki link
https://jazz.net/wiki/bin/view/Main/JazzScmWithJenkinsPlugin

Below are the steps I have done so far.
  1. I downloaded compile-and-test.zip and deliver the project to stream in RTC project area
  2. I downloaded eclipse compiler for java and kept it at directory C:\Users\Admin\jenkinsdemo. I also downloaded zip file of Build system toolkit for RTC version 5.0.2 and exracted it at the C:\Users\Admin\jenkinsdemo\RTCBuildToolkit502
  3. Installed jenkins version 2.32.1. Inside Jenkins I installed Team Concert Plugin version 1.2.0.2

In the jenkins when I configure system i.e. click on Manage Jenkins then Configure System I am unable to add build system toolkit. Also I getting error as " A build toolkit is required to perform builds", When I click on Test connection I get error as "The global build toolkit must be identified in order to connect to RTC".

GUI in this version of Jenkins is lot different than the version used in reference wiki link provided by IBM.

Even though I was getting this error I moved forward with further steps in the wiki link.

Created a jenkins job with all the required parameters to it. Created build engine inside RTC and tested connection.

I created build definition, in the last tab of build definition i.e. Hudson/Jenkins tab when I click on GetJobs button I am getting error as "Error retrieving the Jobs from Hudson/Jenkins : Hudson/Jenkins user was denied access to URL: http://localhost:8080/api/xml?tree=jobs[name,displayName,url,buildable,scm[type,buildType,buildDefinition]"

I am facing two issues here, first I can not add build toolkit to jenkins/my build toolkit is not identified in jenkins. second I am getting above error when I click on GetJobs button.

I am using RTC version 5.0.2.


4 answers



permanent link
Lakshmi Narasimhan T V (4415) | answered Dec 30 '16, 3:53 a.m.
JAZZ DEVELOPER
You should be able to configure build toolkit in Manage Jenkins->Global Tool Configuration. Once configured, you can select the toolkit in Configure System->Rational Team Concert.

Does your Jenkins instance require credentials? If yes, Could your provide the credentials in the build engine  and try again.

Refer to this wiki for Team Concert Plugin configuration  - https://wiki.jenkins-ci.org/display/JENKINS/Team+Concert+Plugin#TeamConcertPlugin-JenkinsConfiguration

Comments
vikrant kamble commented Dec 30 '16, 4:53 a.m. | edited Dec 30 '16, 4:57 a.m.

Hi Lakshmi,
Thank you for the answer, My first issue i.e. I was not able to add build toolkit to jenkins is resolved
I am still having problems fetching jenkins jobs from build definition. I also tried approach of providing credentials in build engine I am still facing the same issue


vikrant kamble commented Dec 30 '16, 6:27 a.m.

I was able to remove second error i.e. Problem in getting Jenkins Jobs under build definition by creating new build engine and new build definition.
reference links are
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.build.doc%2Ftopics%2Ft_hudson_build_eng.html
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.build.doc%2Ftopics%2Ft_hudson_build_def.html

I am getting another error as below when I execute build from RTC
(I mentioned the error in answer posted by me)


permanent link
vikrant kamble (1323897) | answered Dec 30 '16, 6:47 a.m.
Error I am getting when I run build from RTC

Started by user vikrant
Building in workspace C:\Users\Admin\.jenkins\workspace\compile-and-test2
RTC : checkout...
RTC : Build initiated by request from RTC
RTC Checkout : Source control setup
RTC Checkout : Accepting changes into workspace "compile-and-test Workspace2" ...
Using build definition configuration.
Fetching files from repository workspace "compile-and-test Workspace2".
RTC Checkout : Fetching files to fetch destination "C:\Users\Admin\.jenkins\workspace\compile-and-test2\JazzWorkspace" ...
RTC Checkout : Fetching Completed
[compile-and-test] $ cmd.exe /C "ant.bat -file build.xml -DbuildResultUUID=_Kf-pMM6CEeaHVb-D1sZGtw -DbuildDefinitionId=jenkins_definition -DrepositoryAddress=https://localhost:9443/ccm all -lib C:\Users\Admin\jenkinsdemo\RTCBuildToolkit502\jazz\buildsystem\buildtoolkit -lib C:\Users\Admin\jenkinsdemo\ecj-4.4.jar && exit %%ERRORLEVEL%%"
'ant.bat' is not recognized as an internal or external command,
operable program or batch file.
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE


permanent link
Lakshmi Narasimhan T V (4415) | answered Jan 01 '17, 12:47 p.m.
JAZZ DEVELOPER
 This seems to be a Jenkins build step failure and the error should be same when the build is started from Jenkins.

Comments
vikrant kamble commented Jan 01 '17, 1:33 p.m.

 I am getting same error when I run  the build from both end i.e. RTC and jenkins. I tried searching for solution on Google but couldn't find one. In the tutorial video of RTC and jenkins integration, Scott used ant-contrib-1.ob3.jar in the invoke ant step, I also tried using same but I am getting same error. I downloaded ant zip and set path of bin directory in the environment variable, it also did not solve my problem. In the eclipse right click on build.xml  click on run as and set class path for build.xml but it also did not solve  my problem. I am still facing the error.

Please let me know if you know any solution to solve the problem 


permanent link
Ralph Schoon (63.5k33646) | answered Jan 01 '17, 2:21 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 01 '17, 2:24 p.m.
https://www.google.com/search?q=Jenkins+Error+ant.bat =>

  • http://stackoverflow.com/questions/19622677/jenkins-and-ant-ant-bat-not-recognized-but-env-vars-are-set-well
  • http://stackoverflow.com/questions/23319268/jenkins-ant-build-error
  • http://stackoverflow.com/questions/1587172/ant-not-recognized-as-an-internal

Plus 30 or 40 other hits in the search.

This is NOT rocket science and the problem is easy enough to search for and to understand in the first place (ant.bat not being found for whatever reason).



Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.