Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46211

Source Code Management senction is not accepting String parameter

      Source Code Management senction is not accepting String parameter
      I am passing string parameter from Python script the value which is not substituting in the file path of the SCM section.
      ex: File Path: /mnt/test_dir/${PARAM}/

      I am able to see the value of the PRAM in the environment variables section. but the value is not substituting in the file path
       

       

          [JENKINS-46211] Source Code Management senction is not accepting String parameter

          Kiran Gogula added a comment - - edited

          I am just reading files from the given folder location. Not using any version control. if you don't mind can you please send me the sample for pipeline which will satisfy my case.

          I am using parameterized build to add string parameter. the same parameter I am trying to use in SCM file path.

          Kiran Gogula added a comment - - edited I am just reading files from the given folder location. Not using any version control. if you don't mind can you please send me the sample for pipeline which will satisfy my case. I am using parameterized build to add string parameter. the same parameter I am trying to use in SCM file path.

          Kiran Gogula added a comment -

          Why the env or Parameterized build parameters are not available on the SCM file path. I think those variable should be accessible from any plugin in Jenkins. Please help me to understand will send you the screenshots

          Kiran Gogula added a comment - Why the env or Parameterized build parameters are not available on the SCM file path. I think those variable should be accessible from any plugin in Jenkins. Please help me to understand will send you the screenshots

          Oleg Nenashev added a comment -

          > I am just reading files from the given folder location. Not using any version control. if you don't mind can you please send me the sample for pipeline which will satisfy my case.

          I do not know your case, but you can find examples here: https://github.com/jenkinsci/filesystem_scm-plugin/pull/2  . It requires a version form the experimental UC.

          > Why the env or Parameterized build parameters are not available on the SCM file path. 

          It's managed by plugins. Some plugins enable env vars in fields, others - not. For SCM fields it may be error-prone, see my comment about polling above.

           

           

           

           

          Oleg Nenashev added a comment - > I am just reading files from the given folder location. Not using any version control. if you don't mind can you please send me the sample for pipeline which will satisfy my case. I do not know your case, but you can find examples here: https://github.com/jenkinsci/filesystem_scm-plugin/pull/2   . It requires a version form the experimental UC. > Why the env or Parameterized build parameters are not available on the SCM file path.  It's managed by plugins. Some plugins enable env vars in fields, others - not. For SCM fields it may be error-prone, see my comment about polling above.        

          Oleg Nenashev added a comment -

          I do not plan to add support of EnvVar resolution to the plugin. If somebody wants to contribute, I will be happy to review the pull requests.

           

          Oleg Nenashev added a comment - I do not plan to add support of EnvVar resolution to the plugin. If somebody wants to contribute, I will be happy to review the pull requests.  

          Kiran Gogula added a comment -

          That will not help me.

          Kiran Gogula added a comment - That will not help me.

          Oleg Nenashev added a comment -

          kkirangogula so what is your expectation here?

          Oleg Nenashev added a comment - kkirangogula so what is your expectation here?

          Kiran Gogula added a comment -

          As per the design view all plugin should have an access to environment variables that would be more generic. And I have seen the SCM source code, the build parameters are not injected to that. Please let me know that if you can able to make a small change on the same to make sure the build variables should be accessible in SCM section or plugin.

          Please let me know your thought on the above comment.

          Kiran Gogula added a comment - As per the design view all plugin should have an access to environment variables that would be more generic. And I have seen the SCM source code, the build parameters are not injected to that. Please let me know that if you can able to make a small change on the same to make sure the build variables should be accessible in SCM section or plugin. Please let me know your thought on the above comment.

          Oleg Nenashev added a comment -

          > As per the design view all plugin should have an access to environment variables that would be more generic.

          It is not a Jenkins design. Each plugin has its own choice whether to handle env vars or not. If you see it mentioned in documentation anywhere, please provide me a link, Then it will be a bug which we would need to fix.

          > And I have seen the SCM source code, the build parameters are not injected to that. Please let me know that if you can able to make a small change...

          As I mentioned above, this small change needs decisions about the behavior in cases when Environment variables do not exist. And it should be a non-breaking behavior (you can see how much fun I had with it in the Perforce plugin).

          You have not responded to my question about the desired behavior yet, in the current state I see no way to iterate on it.

           

           

          Oleg Nenashev added a comment - > As per the design view all plugin should have an access to environment variables that would be more generic. It is not a Jenkins design. Each plugin has its own choice whether to handle env vars or not. If you see it mentioned in documentation anywhere, please provide me a link, Then it will be a bug which we would need to fix. > And I have seen the SCM source code, the build parameters are not injected to that. Please let me know that if you can able to make a small change... As I mentioned above, this small change needs decisions about the behavior in cases when Environment variables do not exist. And it should be a non-breaking behavior (you can see how much fun I had with it in the Perforce plugin). You have not responded to my question about the desired behavior yet, in the current state I see no way to iterate on it.    

          Kiran Gogula added a comment -

          My expectation was I need to pass dynamic directory name as a parameter from the python script. And currently I am using the custom plugin so in that case I can not use the pipeline plug in to make my build success.

          Kiran Gogula added a comment - My expectation was I need to pass dynamic directory name as a parameter from the python script. And currently I am using the custom plugin so in that case I can not use the pipeline plug in to make my build success.

          Oleg Nenashev added a comment -

          Duplicates JENKINS-7133

          Oleg Nenashev added a comment - Duplicates JENKINS-7133

            Unassigned Unassigned
            kkirangogula Kiran Gogula
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: