简体   繁体   English

使用gitlab-ci建立多个目标最佳实践

[英]Using gitlab-ci to build multiple targets best practice

I am starting to use Gitlab-ci moving away from Jenkins as since the update to xcode 8 Jenkins stoped working correctly it can not sign the ad-hoc or app-store. 我开始使用Gitlab-ci远离Jenkins,因为自从对xcode 8 Jenkins的更新停止正常工作以来,它无法对即席或应用程序商店进行签名。 tried to fix it and gave up. 试图修复它并放弃了。

So here I am with Gitlab-ci a shinny new hope!! 所以在这里,我和Gitlab-ci一起有了灿烂的新希望!!

My project is as follows: 我的项目如下:

1 project file and multiple targets. 1个项目文件和多个目标。

each target is a flavour of the app and I need to get my .gitlab-ci.yml file to for starts create the ad-hoc for each targets.. 每个目标都是应用程序的特色,我需要获取.gitlab-ci.yml文件才能开始为每个目标创建临时对象。

Di I make 1 runner for each target with a .yml file for each runner or it is possible to have 1 runner for this and 1 .yml file to rule them all ? 我为每个目标分配了一个.yml文件来为每个目标分配1个运行者,或者为此可以有1个运行者和一个.yml文件来统治所有这些?

I don't think you can have multiple .yml files even if you wanted but I'm rather sure you don't need it because that one .gitlab-ci.yml file is split into multiple stages (run consecutively) and each stage can have several different jobs (run in parallel). 我认为即使您愿意也不能有多个.yml文件,但是我很确定您不需要它,因为一个.gitlab-ci.yml文件分为多个阶段 (连续运行),每个阶段可以有几个不同的工作 (并行运行)。 Each job can be run by a different runner using tags . 每个作业都可以由不同的跑步者使用标签来运行。 This alone should give you enough flexibility to perform different builds, make different deployments, etc. 仅此一项就应该为您提供足够的灵活性来执行不同的构建,进行不同的部署等。

Whether you would have one or multiple runners depends on whether you have any need to have runners located on different servers or having different configuration (eg one using shell executor , other one using a Docker executor). 是否拥有一个或多个运行程序取决于您是否需要将运行程序放置在不同的服务器上或具有不同的配置(例如,一个运行程序使用shell executor ,另一个运行程序使用Docker executor)。 If not, you can use only one runner because it can perform several jobs simultaneously. 如果没有,您只能使用一个跑步者,因为它可以同时执行多个工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM