How to prevent Jenkins from checking SVN in the workspace folder when using jobs with multiple configurations

I configured the job in Jenkins using a project option with multiple configurations. I can successfully compile user-defined axis targets, but I find that Jenkins first starts checking in the workspace folder (which is not actually used) and checks it in the workspace / target folder in which the assembly is actually being performed for this purpose.

So, when the assembly starts, Jenkins first checks the given URL for the workspace, and then for the workspace / target / etc.

Actual steps:

1. checkout to workspace 2. checkout to workspace/target/<target1> 3. checkout to workspace/target/<target2> 

Expected Steps:

 1. checkout to workspace/target/<target1> 2. checkout to workspace/target/<target2> 

How can I stop Jenkins from doing the first check and doing only the appropriate ones?

Or even better, my builds allow you to do all this at one checkout. Can I do it?

+4
source share
2 answers

The problem is that Jenkins uses parental work, which creates tasks for each goal. Unfortunately, he also performs a workplace check.

If you perform these targets on different slaves / machines, you can set the scan destination directory to be the same as the parent workspace directory. So effectively dividing the workspace into node, rather than duplicating it.

In the Advanced Project Settings section, click the Advanced button to expand the section. Check Use your own workspace and use ".". for the catalog for adjustments . If it is not specified, it defaults to /target/<target1>

Now instead of checking workspace/target/<target1> it will only check workspace/ for different purposes.

+6
source

Workaorund: use a trigger task that will poll SVN, perform a test and start the main task through the Parameterized trigger plugin .

0
source

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


All Articles