I'm working on a project that has already been going on for a while. Unless I am mistaken, part of the use of Jenkins is to store artifacts for desired builds (i.e., releases or tags). This is preferable to me because I don't want to store binaries in the VCS system (SVN).
我正在做一个已经进行了一段时间的项目。除非我弄错了,否则使用Jenkins的部分原因是为所需的构建(即版本或标签)存储工件。这对我来说比较好,因为我不想在VCS系统(SVN)中存储二进制文件。
Moving forward, I can tag successful builds through Jenkins, and the artifacts will be stored forever. But what about old tags? Is there any way I can build all of the previous SVN tags so that the artifacts are available to anyone who needs?
继续前进,我可以通过Jenkins标记成功的构建,并且工件将永久存储。但旧标签呢?有什么方法可以构建所有以前的SVN标签,以便所有需要的人都可以使用这些工件吗?
I guess I could make a separate build for each tag, but that would be very tedious and make it difficult to find the artifacts.
我想我可以为每个标签单独构建,但这将非常繁琐,并且很难找到工件。
2 个解决方案
#1
1
You can add parameters to the jenkins task, and have the parameter dropdowns populate from the SCM tags. You can then use the parameter variables in the URL for the scm pulls.
您可以向jenkins任务添加参数,并从SCM标记填充参数下拉列表。然后,您可以使用URL中的参数变量来获取scm pulls。
So, when you go to run a build task, you can select the tag, and the appropriate source will be pulled.
因此,当您运行构建任务时,您可以选择标记,并将拉出相应的源。
If this is inline with what you're envisioning. I'd be glad to expand.
如果这与你想象的一致。我很乐意扩大。
#2
1
You can create a parameterized build task, which will check out by tag to build. thus, you need only input the tag name at each build.
您可以创建参数化构建任务,该任务将按标记检出以构建。因此,您只需在每个构建时输入标记名称。
But I think you are mistaken -- Jenkins does store artifacts, but it does so more as a side effect of the build, and generally keeps only a couple of the last builds for disk space management. If you want to maintain a library of previous builds, you probably want something like artifactory.
但我认为你错了--Jenkins确实存储了工件,但它更像是构建的副作用,并且通常只保留了几个最后构建的磁盘空间管理。如果您想维护以前版本的库,您可能需要类似神器的东西。
#1
1
You can add parameters to the jenkins task, and have the parameter dropdowns populate from the SCM tags. You can then use the parameter variables in the URL for the scm pulls.
您可以向jenkins任务添加参数,并从SCM标记填充参数下拉列表。然后,您可以使用URL中的参数变量来获取scm pulls。
So, when you go to run a build task, you can select the tag, and the appropriate source will be pulled.
因此,当您运行构建任务时,您可以选择标记,并将拉出相应的源。
If this is inline with what you're envisioning. I'd be glad to expand.
如果这与你想象的一致。我很乐意扩大。
#2
1
You can create a parameterized build task, which will check out by tag to build. thus, you need only input the tag name at each build.
您可以创建参数化构建任务,该任务将按标记检出以构建。因此,您只需在每个构建时输入标记名称。
But I think you are mistaken -- Jenkins does store artifacts, but it does so more as a side effect of the build, and generally keeps only a couple of the last builds for disk space management. If you want to maintain a library of previous builds, you probably want something like artifactory.
但我认为你错了--Jenkins确实存储了工件,但它更像是构建的副作用,并且通常只保留了几个最后构建的磁盘空间管理。如果您想维护以前版本的库,您可能需要类似神器的东西。