Set Workspace path in CT pipeline

Hi,
I have CI and CT pipelines running in Jenkins Agent PC. Pipeline script is configured in Groovy.

Jenkins Pipeline configuration:

  • Folder 1
    • Folder 2
      • Folder 3
        • CI Pipeline
        • CT Pipeline

Observed that, CI pipeline job folder will be created in Jenkins Agent workspace as C:/jenkins/workspace/<pipeline_job_folder>
but, for CT pipeline, folder will be created as C:/Jenkins/workspace/<folder_1>/<folder_2>/<folder_3>/<pipeline_job_folder>

I want CT pipeline job also to execute in similar folder path as CI.

I have verified my groovy script, but didnt find any configuration to set workspace path.
Can you please let me know if there is any such configuration in Jenkins or how to set workspace path before starting CT pipeline execution in groovy.

Thanks,
Pavan.

Hi,

Wouldn’t something like that allow you to get the CT pipeline to execute in the same folder?

node('agent-label') {
    ws('C:/jenkins/workspace/pipeline_job_folder') {
        // Your pipeline steps go here
    }
}

Thanks for your suggestion,
As i mentioned in my earlier post, I want to know how the folder path name gets created.
For Multi-Branch pipeline, folder path will jenkins_root_folder/pipeline_name.
eventhough there are multiple parent folders created above multi-branch pipeline. it will not consider it.
But for normal pipeline, folder will be created with all parent folders in jenkins agent pc.

I couldnt find any configuration for folder path setting for normal pipeline and multi-branch pipeline. will there be any reason about why it happens like that.