Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • GitCode
  • 帮助文档帮助文档
  • Wiki
    • Docs
    • Ci
  • lint

帮助文档
帮助文档
  • 项目概览

GitCode / 帮助文档

通知 1805
Star 580
Fork 459
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 44
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 1
  • DevOps
    • 流水线
    • 流水线任务
    • 计划
  • Wiki 89
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 代码片段
  • 项目成员
  • Pages
帮助文档
帮助文档
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 44
    • Issue 44
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 1
    • 合并请求 1
  • Pages
  • DevOps
    • DevOps
    • 流水线
    • 流水线任务
    • 计划
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 89
    • Wiki
  • 代码片段
    • 代码片段
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 流水线任务
  • 提交
  • Issue看板

lint · 变更

页面历史
lint & ci.yaml 编写于 6月 03, 2021 作者: Miykael_xxm's avatar Miykael_xxm
显示空白变更内容
内联 并排
Showing with 15 addition and 18 deletion
+15 -18
  • docs/ci/lint.md docs/ci/lint.md +15 -18
  • 未找到文件。
docs/ci/lint.md
View page @ 9589ed94
> https://docs.gitlab.com/ee/ci/lint ## 使用 CI Lint 工具验证 .gitlab-ci.yml 语法
Validate .gitlab-ci.yml syntax with the CI Lint tool 如果要在提交更改之前测试 CI/CD 配置的有效性,可以使用 CI Lint 工具。默认情况下,此工具会检查语法和逻辑错误,并且可以模拟创建 Pipelines 以尝试查找更复杂的问题。
If you want to test the validity of your GitLab CI/CD configuration before committing the changes, you can use the CI Lint tool. This tool checks for syntax and logical errors by default, and can simulate pipeline creation to try to find more complicated issues as well.
To access the CI Lint tool, navigate to CI/CD > Pipelines or CI/CD > Jobs in your project and click CI lint. 要访问 CI Lint 工具,请导航到项目中的 CI/CD > Pipelines 或 CI/CD > Jobs ,然后单击CI lint。
### 验证基本逻辑和语法
Validate basic logic and syntax
By default, the CI lint checks the syntax of your CI YAML configuration and also runs some basic logical validations. Configuration added with the includes keyword, is also validated. By default, the CI lint checks the syntax of your CI YAML configuration and also runs some basic logical validations. Configuration added with the includes keyword, is also validated.
To use the CI lint, paste a complete CI configuration (.gitlab-ci.yml for example) into the text box and click Validate: 默认情况下,CI lint 检查 CI YAML 配置的语法,并运行一些基本的逻辑验证。添加了`includes`关键字的配置也会进行验证。
CI Lint 要使用 CI Lint,请将完整的 CI 配置(例如 .gitlab-ci.yml)粘贴到文本框中,然后单击**验证**:
Pipeline simulation ![CI Lint]()
Introduced in GitLab 13.3. ### Pipeline 模拟
Not all pipeline configuration issues can be found by the basic CI lint validation. You can simulate the creation of a pipeline for deeper validation that can discover more complicated issues. 并非所有 Pipeline 配置问题都可以通过基本 CI Lint 验证工具找到。你可以模拟 Pipeline 的创建过程并进行更深入的验证,从而发现更复杂的问题。
To validate the configuration by running a pipeline simulation: Pipeline 模拟验证配置文件的步骤如下:
Paste the GitLab CI configuration to verify into the text box. 1. 将要验证的 CI 配置粘贴到文本框中
Click the Simulate pipeline creation for the default branch checkbox. 2. 单击 模拟创建默认分支 Pipeline 复选框
Click Validate. 3. 单击验证
Dry run
Pipeline simulation limitations
Simulations run as git push events against the default branch. You must have permissions to create pipelines on this branch to validate with a simulation.
#### Pipeline 模拟限制
Pipeline 模拟是通过针对默认分支的 git push 进行,因此你必须[有权](/docs/user/permissions)在此分支上创建 Pipeline 才能使用模拟进行验证。
\ No newline at end of file
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7