How to get jenkins to use an already proven codebase?

I am just starting out with Jenkins 1.487 and wanted to integrate Jenkins into my Ant project. But when setting up, I can’t find a way to get Jenkins to reuse an already tested code base instead of loading a new copy relative to its root workspace. Is there any way to do this?

I tried to specify the user workspace manually (where my code base was already deleted) and clicked "Create Now". As a result, he destroyed my current verification code, saying

 "Checking out a fresh workspace because there no workspace at /home/daud/Work Cleaning local Directory ." 

Even a warning ..

+4
source share
3 answers

If you really want to build from an existing check somewhere in the file system, then do not use the Jenkins Source Control section. Leave this as "none"

  • Go straight to the assembly section
  • Click Add Build Step
  • Choose Invoke Ant "
  • Click Advanced
  • And in the "Build file" section, specify the full path to the ant build file in your file system. You will need to include the drive letter (if on Windows) or the leading / (if on Linux) to exit the workspace (by default this path refers to the workspace). Or use a lot .. /../../ .. if necessary.

But, as others have said, this does not mean that it is supposed to use the CI system

+6
source

The idea of ​​Jenkins and CI is that it works with a new copy of the code base. Each design made by Jenkins should not depend on any external premises and should be reproducible.

+1
source

You might want to try using the SCM Workspace SCM Plugin for Jenkins. This will allow you to consolidate the workspace from one job and use it to create a workspace for another. I used this for top-down jobs that should act on a job from a previous job.

This is also useful if you use something like Git for version control and want to avoid the second Git clone (or SVN checkout). In addition, you can limit the contents of the zip file used to recreate the workspace, for example, to avoid transferring unnecessary files (such as .git or .svn ) downstream.

0
source

Source: https://habr.com/ru/post/1443621/


All Articles