码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • gitlab runner



    # install
    ```
    # Download the binary for your system
    sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64

    # Give it permission to execute
    sudo chmod +x /usr/local/bin/gitlab-runner

    # Create a GitLab Runner user
    sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

    # Install and run as a service
    sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
    sudo gitlab-runner start
    ```

    # register
    在项目的主页面左侧边框点击 ‘设置’选择‘CI/CD';  

    展开runner,将网址和 令牌信息注册到runner:
    ```
    $ sudo gitlab-runner register
    Runtime platform                                    arch=amd64 os=linux pid=8950 revision=d89a789a version=16.4.1
    Running in system-mode.                            
                                                       
    Enter the GitLab instance URL (for example, https://gitlab.com/):
    https://git.xxx.net/
    Enter the registration token:
    GR1348941y7tDcpgyQasv2ugBybs-
    Enter a description for the runner:
    test
    Enter tags for the runner (comma-separated):
    test
    Enter optional maintenance note for the runner:
    test
    WARNING: Support for registration tokens and runner parameters in the 'register' command has been deprecated in GitLab Runner 15.6 and will be replaced with support for authentication tokens. For more information, see https://docs.gitlab.com/ee/ci/runners/new_creation_workflow 
    Registering runner... succeeded                     runner=GR1348941y7tDcpgy
    Enter an executor: docker, virtualbox, shell, ssh, docker-autoscaler, docker+machine, instance, custom, docker-windows, parallels, kubernetes:
    shell
    Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
     
    Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml" 
    /home/gitlab-runner$ 
    ```

    ## run
    注册之后就可以运行'gitlab-runner run'启动runner,等待gitlab服务器下发job。

    ## runner配置
    注册完成后,刷新页面,显示runner信息,点击’、’编辑按钮,勾选‘运行未标记的作业’

    # pipeline
    在项目根目录提交一个 .gitlab-ci.yml 的文件。当提交了以后,就会触发pipeline流水线了。

    ## 管线配置
    怎样限制自动触发,节省服务器

  • 相关阅读:
    电脑技巧:Win10自带的6个实用功能,你都会用吗
    【每日一题】744. 寻找比目标字母大的最小字母
    代码随想录算法训练营Day 52 || 300.最长递增子序列、674. 最长连续递增序列、718. 最长重复子数组
    自然语言处理——英文文本预处理
    12.验证码以及付费代理
    java计算机毕业设计小型健身俱乐部网站源码+系统+数据库+lw文档+mybatis+运行部署
    【融合ChatGPT等AI模型】Python-GEE遥感云大数据分析、管理与可视化及多领域案例实践应用
    数仓问答篇(一)
    【备忘】清理Office缓存
    性能测试 —— Tomcat监控与调优:Jconsole监控
  • 原文地址:https://blog.csdn.net/liuxs2009/article/details/133773421
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号