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

MultiBranch Pipeline Job chooses default workspace. Not creating as per Jenkins folder structure

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • branch-api-plugin
    • None

      Hi Team,

      I have Created a Jenkins Multibranch pipeline job inside the Folder ALM->PORTAL->Portal-multibranchpipeline

      But the workspace for the Multibranch pipeline job is not created inside the ALM->PORTAL->Portal-multibranchpipeline
      The workspace is getting created in the default workspace directory.

          [JENKINS-62629] MultiBranch Pipeline Job chooses default workspace. Not creating as per Jenkins folder structure

          Liam Newman added a comment -

          Could you give some addition information about your configuration? What does your config.xml look like? What does your Jenkinsfile look like?

          Liam Newman added a comment - Could you give some addition information about your configuration? What does your config.xml look like? What does your Jenkinsfile look like?

          Hi bitwiseman,

          I have created a Multibranch pipeline job in jenkins under ALM folder. https://jenkins.test.com/jenkins/job/ALM/job/DOT-WebPortal/

          which clones the git repository where Jenkinsfile is present.

          But the workspace is created inside the root directory of the workspace defined in node/slave configuration.

          The workspace should be created in workspace/ALM/job/

          Prasanna Rengarajan added a comment - Hi bitwiseman , I have created a Multibranch pipeline job in jenkins under ALM folder.  https://jenkins.test.com/jenkins/job/ALM/job/DOT-WebPortal/ which clones the git repository where Jenkinsfile is present. But the workspace is created inside the root directory of the workspace defined in node/slave configuration. The workspace should be created in workspace/ALM/job/

          Liam Newman added a comment -

          prasanna2104

          The default behavior is to have the workspace created under to the same path as the job name - workspace/ALM/job/DOT-WebPortal/.

          It sounds like your specifying the workspace (either on the agent config, in the job config, or in the pipeline itself) in a way that is overriding the default behavior.

          Do you have any part of the agent config, in the job config, or in the pipeline itself try to change the workspace in any way?

          Liam Newman added a comment - prasanna2104 The default behavior is to have the workspace created under to the same path as the job name - workspace/ALM/job/DOT-WebPortal/. It sounds like your specifying the workspace (either on the agent config, in the job config, or in the pipeline itself) in a way that is overriding the default behavior. Do you have any part of the agent config, in the job config, or in the pipeline itself try to change the workspace in any way?

          Hi bitwiseman,

          In Slave Config, we mentioned only the Root Directory. The Workspace is getting created under the remote directory. The workspace for Free Style jobs are getting created under /app/dot_slave/jenkins_slave/workspave/ALM/job/DOT-WebPortal/TestProject. Only Multibranch pipeline fails to create workspace under specific directory. In job config also we are not overriding the workspace env variable.

           

          Prasanna Rengarajan added a comment - Hi bitwiseman , In Slave Config, we mentioned only the Root Directory. The Workspace is getting created under the remote directory. The workspace for Free Style jobs are getting created under /app/dot_slave/jenkins_slave/workspave/ALM/job/DOT-WebPortal/TestProject. Only Multibranch pipeline fails to create workspace under specific directory. In job config also we are not overriding the workspace env variable.  

          Prasanna Rengarajan added a comment - - edited

          Hi igalg / bitwiseman,

          Kindly update on the status of the above mentioned issue.

          Prasanna Rengarajan added a comment - - edited Hi igalg / bitwiseman , Kindly update on the status of the above mentioned issue.

          Hi igalg / bitwiseman,

          Kindly update on the status of the above mentioned issue.

          Prasanna Rengarajan added a comment - Hi  igalg  /  bitwiseman , Kindly update on the status of the above mentioned issue.

            igalg Igal Gluh
            prasanna2104 Prasanna Rengarajan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: