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

Specifying a manifest file in a subdirectory causes app root to change

    XMLWordPrintable

Details

    Description

      When pushing an application (in a post-build action) with a manifest that specifies no path, and the manifest is stored in a directory of the workspace (instead of the root) the plugin will consider the directory containing the manifest as the application root.

      This is not what the CF CLI does: https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#find-app ("By default, cf push recursively pushes the contents of the current working directory.")

      The bug is here: https://github.com/jenkinsci/cloudfoundry/blob/2d6a76851dd0c9e6125b1ab43fec6b5fe18b5d60/src/main/java/com/hpe/cloudfoundryjenkins/DeploymentInfo.java#L175-L187 (if no path is in the manifest appPath = "" (L177) then L187 will set this.appPath to the directory containing the manifest.

      Attachments

        Activity

          sworisbreathing Steven Swor added a comment -

          cafxx - have you tried with the 2.x version of the plugin? The DeploymentInfo class is no longer used, and the push should happen from the workspace root now.

          If it's still an issue on 2.x, would you be able to provide a small reproducible test case to demonstrate the bug?

          sworisbreathing Steven Swor added a comment - cafxx - have you tried with the 2.x version of the plugin? The DeploymentInfo class is no longer used, and the push should happen from the workspace root now. If it's still an issue on 2.x, would you be able to provide a small reproducible test case to demonstrate the bug?

          People

            williamg William Gautier
            cafxx Carlo Alberto Ferraris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: