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

Working directory of Phing set to the directory of your custom build script instead of Jenkins workspace

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: phing-plugin
    • Labels:
      None
    • Environment:
      Ubuntu 10.04 LTS
    • Similar Issues:

      Description

      When you invoke Phing and configure a custom build script, the working directory of Phing is set to the same directory where your custom build script is located in. This makes it difficult to run Phing from your local development environment and Jenkins.

      I currently have to set the basedir setting of my project to "../../" instead of "." because my build script is located in "Build/Phing" (relative to the root directory of my project). For a developer it would be more logical that a Phing job runs successfully if you execute it from the root of your project, e.g. "phing -f Build/Phing/Master.xml".

      In my situation the Phing plugin in Jenkins invokes Phing from the "<workspace>/Build/Phing" directory. This means that a developer first has to change to this directory when he wants to execute the Phing build locally. I would like to suggest that Jenkins executes Phing the same way as you would normally in your local environment.

      This problem can be circumvented by simply using a execute shell build step which invokes phing using the following command (in my example) "phing -f Build/Phing/Master.xml <target>" but I prefer to keep using the Phing plugin of Jenkins if it would work correctly.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          src/main/java/hudson/plugins/phing/PhingBuilder.java
          src/main/resources/hudson/plugins/phing/PhingBuilder/config.jelly
          http://jenkins-ci.org/commit/phing-plugin/2974f1d3ff2b9d3bc238e738850433e4db1bc59a
          Log:
          [FIXED JENKINS-12078] Working directory of Phing set to the directory of your custom build script
          instead of Jenkins workspace

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: src/main/java/hudson/plugins/phing/PhingBuilder.java src/main/resources/hudson/plugins/phing/PhingBuilder/config.jelly http://jenkins-ci.org/commit/phing-plugin/2974f1d3ff2b9d3bc238e738850433e4db1bc59a Log: [FIXED JENKINS-12078] Working directory of Phing set to the directory of your custom build script instead of Jenkins workspace
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_phing #51
          [FIXED JENKINS-12078] Working directory of Phing set to the directory of your custom build script

          Seiji Sogabe :
          Files :

          • src/main/resources/hudson/plugins/phing/PhingBuilder/config.jelly
          • src/main/java/hudson/plugins/phing/PhingBuilder.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_phing #51 [FIXED JENKINS-12078] Working directory of Phing set to the directory of your custom build script Seiji Sogabe : Files : src/main/resources/hudson/plugins/phing/PhingBuilder/config.jelly src/main/java/hudson/plugins/phing/PhingBuilder.java
          Hide
          hvosdrecomm Hans Vos added a comment -

          Thank you, how long does it usually take before changes are accepted and merged?

          Show
          hvosdrecomm Hans Vos added a comment - Thank you, how long does it usually take before changes are accepted and merged?

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              hvosdrecomm Hans Vos
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: