Question regarding workspace caching (OD-654)
Closed
jbauer opened 2 years ago

Hi,

I have a large repository stored in OneDev (which is a manually managed mirror of a GitHub project with some added custom commits) and in order to be able to build that repository it also needs a clone of a second repository stored on GitHub which is also pretty large.

So I have two job steps: 1.) Checkout: Retrieves the repository from OneDev and places it into the root directory of the job workspace automatically. 2.) Execute Command - Fetch tags of repository stored in OneDev - Compute some env variables based on fetched tags - git clone command to retrieve the second repository into a subfolder, e.g. <job workspace>/libs-repo.git - Call command to start the build using the repository fetched from OneDev and the cloned libs-repo.git repository

I want to cache both repositories in the workspace so that future builds only need to pull changes since both are large. I tried to define a cache key using path . but that seems to be illegal.

In Jenkins I have two builds defined: Build "app" that first triggers build "lib" and waits for build "lib" to be completed before continuing with build "app". Build "lib" only pulls the GitHub Repo changes and build "app" then points to the workspace of the "lib" build in order to use the up-to-date libs. Since "app" and "lib" are two different builds in Jenkins, both are cached on their own and both only pull changes.

How would I do something similar in OneDev to speed up the build? Maybe the "checkout" job step should ask for an optional target directory inside the job workspace? So that I could have <job workspace>/repo-from-onedev and <job workspace>/repo-from-github and use those two folders for OneDev caching feature?

Robin Shen changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
Robin Shen commented 2 years ago

Caching workspace is not supported. To solve this type of problem, an improvement request (issue #656) is created to support checking out repository to a sub directory.

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-654
Please wait...
Page is in error, reload to recover