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

Support test and configuration directories

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently the only supported directories for the Pipeline Shared Groovy Library plugin are "src" and "vars". It would be helpful if directories for storing configuration variables and unit tests were also supported. As stated in the plugin documentation "Other directories under the root are reserved for future enhancements.", so for reasons of forwards compatibility it makes sense for developers not to assume folders they create for these purposes won't break their libraries in future versions.

      Perhaps the "src" directory could support a more standard layout such as "src/main" , "src/test", "src/resources"? Or perhaps new directories at the top level such as "conf" and "test"?

      The "test" would be for unit testing the code in "src" and "vars". The "conf" directory would be used for configuration files such as YAML or JSON where credential IDs, job names etc. could be stored, decoupled from the code.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Not an exact duplicate of JENKINS-46721, as this requests something stronger—the ability to place specific folders in arbitrary locations, rather than in the current structure but under a lower root—but closely related.

            Show
            jglick Jesse Glick added a comment - Not an exact duplicate of  JENKINS-46721 , as this requests something stronger—the ability to place specific folders in arbitrary locations, rather than in the current structure but under a lower root—but closely related.
            Hide
            adamvoss Adam Voss added a comment -

            Jesse Glick If I understand your comment correctly, I don't interpret this this request the same as you do.  I read this as a request for standardization of where config and test files are expected within a pipeline library rather than a request that there be configuration options for where each of the folders are.

            Show
            adamvoss Adam Voss added a comment - Jesse Glick If I understand your comment correctly, I don't interpret this this request the same as you do.  I read this as a request for standardization of where config and test files are expected within a pipeline library rather than a request that there be configuration options for where each of the folders are.
            Hide
            jglick Jesse Glick added a comment -

            There is no standardization of testing Pipeline libraries, so that is not really an option.

            Show
            jglick Jesse Glick added a comment - There is no standardization of testing Pipeline libraries, so that is not really an option.
            Hide
            adamvoss Adam Voss added a comment -

            There is no standardization of testing Pipeline libraries

            Is that really true?  The documentation seems to give a prescriptive directory structure which seems enforced in the code.

            Show
            adamvoss Adam Voss added a comment - There is no standardization of testing Pipeline libraries Is that really true?  The documentation seems to give a  prescriptive directory structure which seems enforced in the code .
            Hide
            jglick Jesse Glick added a comment -

            Yes there is a defined directory structure—there has to be, or the feature could not work without having every library reference specify these folder paths. Testing is not part of that.

            Show
            jglick Jesse Glick added a comment - Yes there is a defined directory structure—there has to be, or the feature could not work without having every library reference specify these folder paths. Testing is not part of that.
            Hide
            adamvoss Adam Voss added a comment -

            Jesse Glick In that case, what is actionable here?  I came here via workflow-cps-global-lib-plugin#40 where it is requested this JIRA be addressed.  That (testing) seems to be exactly what the requestor is asking for:

            It would be helpful if directories for storing configuration variables and unit tests were also supported.

             

            Show
            adamvoss Adam Voss added a comment - Jesse Glick In that case, what is actionable here?  I came here via workflow-cps-global-lib-plugin#40 where it is requested this JIRA be addressed.  That (testing) seems to be exactly what the requestor is asking for: It would be helpful if directories for storing configuration variables and unit tests were also supported.  
            Hide
            jglick Jesse Glick added a comment -

            That PR would merely allow you to select a different subdirectory. Why you would do that, and what you place in other related directories, is up to you.

            Show
            jglick Jesse Glick added a comment - That PR would merely allow you to select a different subdirectory. Why you would do that, and what you place in other related directories, is up to you.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              boon Joe Harte
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: