1

I am using RTC plugin for get source from IBM Rational Teamconcert in Jenkins, but how can I pass the parameter that I declared using This project is parameterized plugin like the image below

enter image description here

enter image description here

I used %variable_name% but not successful.

Talha Junaid
  • 2,351
  • 20
  • 29
taibc
  • 897
  • 2
  • 15
  • 39

1 Answers1

0

You can see an example of a String parameter used in the Job Configuration section of this plugin.

However, make sure your Jenkins is running on Windows if you want to use %A_VARIABLE% syntax.
If it runs on Linux, that would be ${A_VARIABLE}.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • My Jenkins is running on Windows. I also tried ${A_VARIABLE}, but not successful. Error detail is: A project area with name "%PARAM_PROJECTNAME_TEAMCONCERT%" cannot be found. – taibc Aug 23 '18 at 05:13
  • @taibc Strange, considering https://stackoverflow.com/a/33279636/6309. Do you see that error during the configuration of the plugin? Or at runtime, when trying to enter a value for that parameter? – VonC Aug 23 '18 at 06:15
  • I got this error at runtime. I can use %variable% at another places, like properties fields user.admin=%PARAM_WAS_USERADMIN% pass.admin=%PARAM_WAS_PASSADMIN% – taibc Aug 23 '18 at 06:23
  • @taibc Then it seems to be a bug in https://github.com/jenkinsci/teamconcert-plugin source code, where the project name does not seem to be properly fetched (meaning does not take into account the case where it is an environment variable) – VonC Aug 23 '18 at 06:59
  • Thanks @VonC, what should I do ? I want to pass all parameters at "click build" step – taibc Aug 23 '18 at 07:02
  • @taibc First test that, if you set an actual project name in that field (not a variable), it does work. – VonC Aug 23 '18 at 07:06
  • Yes, it is successful with actual value – taibc Aug 23 '18 at 07:07
  • @taibc if that is working, can you check the environment variables of the completed job? Do you see that project name associated to an environment variable (set by the plugin this time, not set by your parameters) – VonC Aug 23 '18 at 07:11
  • I can use my variable at window execute batch windows: Eg. echo "Project name" + %PARAM_PROJECTNAME_TEAMCONCERT% . And I think the project name is not associated to an environment variable because I need to specify it to download source from SCM – taibc Aug 23 '18 at 07:23
  • "And I think the project name is not associated to an environment variable": exactly, hence my suggestion to report that as a bug to the plugin project. – VonC Aug 23 '18 at 07:28