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 created issue -
          Kiran Gogula made changes -
          Epic Link New: JENKINS-45429 [ 183597 ]
          Kiran Gogula made changes -
          Summary Original: Source Code Management senction is an accepting String parameter New: Source Code Management senction is not accepting String parameter
          Kiran Gogula made changes -
          Description Original: Source Code Management senction is an 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
           

           
          New: 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
           

           
          Oleg Nenashev made changes -
          Epic Link Original: JENKINS-45429 [ 183597 ]
          Oleg Nenashev made changes -
          Labels Original: scm New: environment parameters scm

          Oleg Nenashev added a comment -

          It definitely works well for Pipeline.

          Regarding classic jobs, it's more complicated than one may think. For checkout it's possible to do it for sure, but cases like SCM polling and Workspace cleanup are problematic since there is no parameter values there. How do you see such case?

          Oleg Nenashev added a comment - It definitely works well for Pipeline. Regarding classic jobs, it's more complicated than one may think. For checkout it's possible to do it for sure, but cases like SCM polling and Workspace cleanup are problematic since there is no parameter values there. How do you see such case?

          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.        

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

              Created:
              Updated:
              Resolved: