作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个用于部署应用程序的厨师食谱。每次配方运行时,它都会创建一个新的“发布”(带有当前时间戳)目录并删除旧的“发布”目录,只留下 5 个最近的“发布”目录。 (类似于 Capistrano 的 keep_releases 的工作方式)。
为了测试该功能,我需要运行我的“部署”配方 6 次并验证只有 5 个“发布”目录。似乎我不能在 run_list 中多次使用相同的配方。
有任何想法吗?
谢谢!
最佳答案
2019 年更新:使用 multiple_converge
如 https://docs.chef.io/config_yml_kitchen.html 中所述
旧解决方案:
您可以使用重复的套件名称将节点收敛两次(或多次)。
例如在您的 .kitchen.yml 中运行“默认”套件两次:
suites:
- name: default
run_list:
- recipe[your-cookbook::recipe]
attributes:
- name: default
run_list:
- recipe[your-cookbook::recipe]
attributes:
关于chef-infra - 如何让测试厨房多次运行相同的 Chef Recipe ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30386630/
我是一名优秀的程序员,十分优秀!