Jenkins - Keep workspace permanently and update; Build separate jenkins jobs within that workspace

StackOverflow https://stackoverflow.com/questions/18317403

  •  25-06-2022
  •  | 
  •  

質問

I have a build area (BuildArea) checked in, which contains shared scripts and wrappers and whatnot that I use to build a project. This is rarely updated.

Separately, I have various projects (Proj1, Proj2, Proj3...) under development which update regularly.

Standard flow is to checkout the latest source files from a project (e.g. Proj1), and then build the project in my build area (BuildArea). The next day there's an update to Proj1 and also a Proj2, which I also want to build in my build area. All these builds only read the files in BuildArea; no modifications are made except to create a unique results directory.

So, my questions are: 1. Can I create a Jenkins job that maintains a build area (BuildArea) and updates daily for example. 2. Can I then kick off independent Jenkins jobs that run within that build area and dump their results there?

The main reason I want to do this is that there are many projects run during the week and the build area is enormous, so checking out a local build area for each project is a big waste of resource.

役に立ちましたか?

解決

Yes, this should be possible. Set your primary job with a custom workspace and have it store the files in a networked location, and then set up the scripts from your smaller jobs to access those files directly. We use clearcase and i had set up something similar with snapshot views. Your first job will just have the scm step, and your smaller jobs will only pull the files for your project.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top