GitLab-CI 指南

GitLab CI 指南

前置工作
  • 部署GitLab

  • 部署GitLab-Runner

  • 注册Runner到GitLab

    docker exec -it gitlab-runner bash # 进入容器
    gitlab-runner register  #调用register命令开始注册
    # 在Gitlab Setting中找到Runners,如下图所示
    
    Enter the GitLab instance URL (for example, https://gitlab.com/):复制Register Url 
    Enter the registration token:复制register token
    
    Enter a description for the runner:输入描述信息
    
    Enter tags for the runner (comma-separated):输入一个标记,简短即可,供后续使用
    
    Enter an executor: virtualbox, docker+machine, docker-ssh+machine, kubernetes, custom, docker, docker-ssh, ssh, parallels, shell:选择执行方式,选择docker即可(在docker中进行后续操作)
    
    Enter the default Docker image (for example, ruby:2.6):设置默认的docker镜像
    
    注册完成
    Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
    

GitLab-CI 指南_第1张图片

在项目工程根目录下

你可能感兴趣的:(#,GitLab,gitlab,ci/cd)