流浪者的发展和 CI
Vagrant for development and CI
我想设置以下工作流程。
- 每个项目都有一个受版本控制的 Vagrant 文件和一个为每次配置更改构建虚拟机的 Jenkins 作业。此虚拟机旨在用于持续集成和开发。
- 一位开发者加入了一个项目。他从 Jenkins 中获取相应的虚拟机,该虚拟机已全部设置和配置。
- 他运行是他下载的虚拟机。他所有的喜好,例如。 .gitconfig .vimrc 等已经在该虚拟机上的主目录中,即他使用虚拟机进行编码,而不仅仅是 运行 和测试。
- 当 Jenkins 下的项目构建作业检测到存储库中的更改时,它会从开发人员使用的同一作业中获取虚拟机作为人工制品,并运行构建
这将允许新的开发人员在几分钟内准备好在持续集成服务器使用的完全相同的环境中编写代码,并在虚拟机的帮助下部署到任何地方。
我想我可以用 Vagrant 和 Chef 试试这个,但我不确定它们是否真的适合那样使用。有什么想法吗?
Each project has a Vagrant file under version control and a Jenkins
job that builds the virtual machine for every configuration change.
This virtual machine is meant to be used both for continuous
integration and development.
Vagrantfile 定义了您的应用程序环境应该是什么样子。
随着配置(Chef、Puppet、Ansible 或 Shell ...),您将为在您的项目中工作的每个团队成员创建完全相同的 VM。
然后您不需要创建 VM 并使用来自 CI 或开发人员的相同 VM 实例。每个人都会有自己的环境。
A developer joins a project. He grabs the corresponding virtual
machine from Jenkins which is all setup and configured.
每个开发人员都将在他们的笔记本电脑上从同一个 Vagrantfile 启动一个 VM 运行ning - 无需共享 VM。
When the project's build job under Jenkins detects a change in the
repository, it grabs the virtual machine as an artefact from the same
job the developer used and runs the build
您可以使用 Jenkins vagrant-plugin 从与您的项目对应的相同 Vagrantfile 启动 VM。您不会 运行 来自现有 VM 的作业。
注意:如果您担心配置会花费太多时间,这就是您说要使用现有 VM 的原因,您可以创建一个安装了所有依赖项的新框并重新打包以将其用作新基础盒子
我想设置以下工作流程。
- 每个项目都有一个受版本控制的 Vagrant 文件和一个为每次配置更改构建虚拟机的 Jenkins 作业。此虚拟机旨在用于持续集成和开发。
- 一位开发者加入了一个项目。他从 Jenkins 中获取相应的虚拟机,该虚拟机已全部设置和配置。
- 他运行是他下载的虚拟机。他所有的喜好,例如。 .gitconfig .vimrc 等已经在该虚拟机上的主目录中,即他使用虚拟机进行编码,而不仅仅是 运行 和测试。
- 当 Jenkins 下的项目构建作业检测到存储库中的更改时,它会从开发人员使用的同一作业中获取虚拟机作为人工制品,并运行构建
这将允许新的开发人员在几分钟内准备好在持续集成服务器使用的完全相同的环境中编写代码,并在虚拟机的帮助下部署到任何地方。
我想我可以用 Vagrant 和 Chef 试试这个,但我不确定它们是否真的适合那样使用。有什么想法吗?
Each project has a Vagrant file under version control and a Jenkins job that builds the virtual machine for every configuration change. This virtual machine is meant to be used both for continuous integration and development.
Vagrantfile 定义了您的应用程序环境应该是什么样子。 随着配置(Chef、Puppet、Ansible 或 Shell ...),您将为在您的项目中工作的每个团队成员创建完全相同的 VM。 然后您不需要创建 VM 并使用来自 CI 或开发人员的相同 VM 实例。每个人都会有自己的环境。
A developer joins a project. He grabs the corresponding virtual machine from Jenkins which is all setup and configured.
每个开发人员都将在他们的笔记本电脑上从同一个 Vagrantfile 启动一个 VM 运行ning - 无需共享 VM。
When the project's build job under Jenkins detects a change in the repository, it grabs the virtual machine as an artefact from the same job the developer used and runs the build
您可以使用 Jenkins vagrant-plugin 从与您的项目对应的相同 Vagrantfile 启动 VM。您不会 运行 来自现有 VM 的作业。
注意:如果您担心配置会花费太多时间,这就是您说要使用现有 VM 的原因,您可以创建一个安装了所有依赖项的新框并重新打包以将其用作新基础盒子