我有一个构建和部署两个不同组件的存储库-前端和后端。其中每一个都有一组需要为CICD执行的特定步骤。有没有办法根据实际更改的组件运行一组有选择的步骤。例如,假设我所有的前端都在前端下,所有的后端都在后端下。当只有前端有变化时,有没有办法运行一组有选择的步骤?
发布于 2018-04-28 04:19:27
最接近的方法是采用分支命名约定,将前端和后端测试构建分开。
例如,您可以使用frontend-前缀管理所有前端工作,使用backend-前缀管理所有后端工作。然后,codeship-steps.yml将被实现为:
- name: Frontend tests
service: your-app
type: serial
tag: ^frontend-
steps:
- service: your-app
command: ./run-frontend-test.sh
- [other step commands...]
- name: Backend tests
service: your-app
type: serial
tag: ^backend-
steps:
- service: your-app
command: ./run-backend-test.sh
- [other step commands...]
有关详细信息,请参阅here。
https://stackoverflow.com/questions/50069457
复制相似问题