ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

DevOps CD build server gitlab

2021-06-17 11:55:03  阅读:204  来源: 互联网

标签:gitlab GitLab CD failure build test server unit


Organizations implement CD pipelines using pieces of technology such as Jenkins, TravisCI, or GitLab. GitLab is an integrated platform that hosts both the repository and the issue tracker.

A build server is a reusable infrastructure, which enables developers to define custom CD pipelines and is configured through configuration files. In GitLab the configuration file is .gitlab-ci.yml; other build servers have similar configuration files.

组织使用诸如詹金斯(Jenkins),TravisCI或GitLab之类的技术来实现CD管道。 GitLab是一个集成平台,可托管资源库和问题跟踪器。

构建服务器是可重用的基础结构,它使开发人员能够定义自定义CD管道并通过配置文件进行配置。在GitLab中,配置文件为.gitlab-ci.yml;其他构建服务器具有类似的配置文件。

Stages: every change committed to a version control system as Git has to pass these stages during the build, If no stages are defined, the default stages in GitLab are build, test, and deploy.

Jobs: The automation tasks are defined as jobs, the basic unit of the CD pipeline. The example defines two jobs, code_quality and unit_test.

Script: specific scripts that are defined in the script line are invoked. For example, a Java project could include the script line script: mvn test to start all unit tests through the Maven build tool.

When: Developers can also configure when to run a job (e.g., when: manual),

Retry: how many times a job can be auto-retried in case of failures (e.g., retry: 3),

Allow_failure: whether a job is allowed to fail (i.e., allow_failure: true).

阶段:由于在构建过程中Git必须通过这些阶段,因此提交给版本控制系统的每个更改都必须经过这些阶段。如果未定义任何阶段,则GitLab中的默认阶段是构建,测试和部署。

作业:自动化任务定义为作业,是CD管道的基本单位。该示例定义了两个作业,code_quality和unit_test。

脚本:调用脚本行中定义的特定脚本。例如,一个Java项目可以包括脚本行脚本:mvn test以通过Maven构建工具启动所有单元测试。

时间:开发人员还可以配置运行作业的时间(例如,时间:手动),

重试:在发生故障的情况下可以自动重试作业的次数(例如,重试次数:3),

Allow_failure:是否允许作业失败(即allow_failure:true)。

 

 

标签:gitlab,GitLab,CD,failure,build,test,server,unit
来源: https://blog.51cto.com/u_15077160/2914379

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有