Jenkins - 永久保留工作区并更新;在该工作区中构建单独的 jenkins 作业 [英] Jenkins - Keep workspace permanently and update; Build separate jenkins jobs within that workspace

查看:59
本文介绍了Jenkins - 永久保留工作区并更新;在该工作区中构建单独的 jenkins 作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我签入了一个构建区域 (BuildArea),其中包含共享脚本和包装器以及我用于构建项目的其他内容.这很少更新.

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.

另外,我有各种项目(Proj1、Proj2、Proj3...)正在开发中,它们会定期更新.

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

标准流程是从项目(例如Proj1)中检出最新的源文件,然后在我的构建区(BuildArea)中构建该项目.第二天有 Proj1 和 Proj2 的更新,我也想在我的构建区域构建.所有这些构建都只读取 BuildArea 中的文件;除了创建唯一的结果目录外,没有进行任何修改.

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.

所以,我的问题是:1. 例如,我可以创建一个维护构建区域 (BuildArea) 并每天更新的 Jenkins 作业.2. 然后我可以启动在该构建区域内运行的独立 Jenkins 作业并将其结果转储到那里吗?

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.

推荐答案

是的,这应该是可能的.使用自定义工作区设置主要作业并将文件存储在网络位置,然后从较小的作业中设置脚本以直接访问这些文件.我们使用 clearcase 并且我已经设置了类似于快照视图的内容.您的第一个工作将只有 scm 步骤,而您的小工作只会为您的项目提取文件.

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.

这篇关于Jenkins - 永久保留工作区并更新;在该工作区中构建单独的 jenkins 作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆