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

Difference in root path when using job-dsl-plugin in jenkins versus standalone

    Details

    • Similar Issues:

      Description

      I can run job-dsl-plugin without problem from within Jenkins but when I run the standalone plugin from the same directory( workspace root) as inside Jenkins I get problem with imports in my *.dsl files.
      They are placed in the same directory as my *.dsl files and the imports works fine when I run the standalone plugin in the same directory, but when I move to the workspace root it does not work.
      I have tried to change the imports from "import constants" into "import project1/dsls/constants" and add package declarations in the imported files like "package project1.dsls" and that works but then it does not work from inside Jenkins anymore.

      Example file structure:

      - workspace( Jenkins)
        - scripts
          - start.groovy
        - project1
          - dsls
            - dsl1.dsl
            - dsl2.dsl
            - constants
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          docs/User-Power-Moves.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/Run.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/0df6e080960703df15891164d01ea472c50806fb
          Log:
          Merge pull request #1023 from daspilker/JENKINS-42299

          JENKINS-42299 added a switch to the command line runner

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/f8b51912215c...0df6e0809607

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/User-Power-Moves.md job-dsl-core/src/main/groovy/javaposse/jobdsl/Run.groovy http://jenkins-ci.org/commit/job-dsl-plugin/0df6e080960703df15891164d01ea472c50806fb Log: Merge pull request #1023 from daspilker/ JENKINS-42299 JENKINS-42299 added a switch to the command line runner Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/f8b51912215c...0df6e0809607
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          docs/User-Power-Moves.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/Run.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/b75d2f01ffa92fb982b7eb405ee79a7a44080514
          Log:
          Added a switch to the command line runner to put the script's directory on the classpath, see

          [FIXES JENKINS-42299]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/User-Power-Moves.md job-dsl-core/src/main/groovy/javaposse/jobdsl/Run.groovy http://jenkins-ci.org/commit/job-dsl-plugin/b75d2f01ffa92fb982b7eb405ee79a7a44080514 Log: Added a switch to the command line runner to put the script's directory on the classpath, see [FIXES JENKINS-42299]
          Hide
          daspilker Daniel Spilker added a comment -
          Show
          daspilker Daniel Spilker added a comment - Link to the mailing list discussion: https://groups.google.com/d/topic/job-dsl-plugin/KTnoPD4w-Ec/discussion

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              perarne Per-Arne Landström
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: