Rajeev Shukla
Rajeev Shukla

Reputation: 174

Perforce plugin in jenkins creates a workspace

I have Perforce managing our source. I have an application that uses Perforce as the back end. I have also setup an automated test tool that runs my application and performs automated tests. I want Jenkins to trigger the test every time there is a change in the source code. However, my Jenkins instance messes up the workspace root. It creates its own workspace root and that causes my application to fail. Jenkins actually overwrites the Perforce clients workspace root. So every time I try to get Jenkins work, I have to go and edit the workspace root in Perforce and reset it to the required value. I have tried getting Jenkins to manage the workspace and clearing the option to do the same but have failed. Is there anyway that Jenkins will use my workspace (root) settings and not change it?

Upvotes: 1

Views: 2044

Answers (1)

paul allen
paul allen

Reputation: 340

Jenkins 'owns' the Perforce workspace used for the build, hence it sets the root.

Your application should ideally build and run independently of its location. However, there is the 'Advanced Project Options' --> 'Use custom workspace' configuration option in Jenkins.

Jenkins must have it's own Perforce workspace separate to your own development workspace. Use the Template workspace to mirror the options or create a Manual workspace for Jenkins own use.

Please note, there are two Perforce plugins for Jenkins p4 and perforce, documentation for the p4 plugin is located here/

Upvotes: 2

Related Questions