美文网首页
gitlab 安全部署实践-翻译

gitlab 安全部署实践-翻译

作者: wwq2020 | 来源:发表于2020-07-23 23:58 被阅读0次

Protected Environments

导航到项目的Settings > CI/CD.
展开Protected Environments.
在Environment下拉菜单,选取你想保护的环境
在允许部署的下拉菜单中,选则用希望给予部署权限的角色,用户或者组.
有2个角色可以选择:
Maintainers:给项目中所有maintainers权限
Developers:给项目中所有maintainers和developers权限
只有选择和项目关联的组你才能选择
至少拥有developers角色的用户才会出现在菜单

顺序部署

runner 对于同一个 resource_group 不会并发执行

ci yaml 中

deploy-to-production:
  script: deploy
  resource_group: production
导航到Settings > CI / CD
Go to Settings > CI/CD.
展开General pipelines.
设置Skip outdated deployment jobs复选框
保存

ci yaml 中

deploy_to_production:
  stage: deploy
  script: deploy_to_prod.sh
  rules:
    - if: $CI_DEPLOY_FREEZE == null

设置 deploy freeze

首先得有项目的maintainer权限
navigate to Settings > CI / CD.
翻到Deploy freezes.
展开查看deploy freeze表,打开.
输入开始和结束时间,以及时区

相关文章

网友评论

      本文标题:gitlab 安全部署实践-翻译

      本文链接:https://www.haomeiwen.com/subject/erkllktx.html