zoukankan      html  css  js  c++  java
  • gitlab-runner (一)

    gitlab-runner用来跑 job, 每个 job 都是独立运行的, 每个 job 名称可以随意命名, 但是 script 是必填项, before_script 会在每个 job 执行之前执行, 不是必填项。

    This is the simplest possible configuration that will work for most Ruby applications:

    1. Define two jobs rspec and rubocop (the names are arbitrary) with different commands to be executed.
    2. Before every job, the commands defined by before_script are executed.

    The .gitlab-ci.yml file defines sets of jobs with constraints of how and when they should be run. The jobs are defined as top-level elements with a name (in our case rspec and rubocop) and always have to contain the script keyword. Jobs are used to create jobs, which are then picked by Runners and executed within the environment of the Runner.

    What is important is that each job is run independently from each other.

    maven项目构建:(variables, cache 记着写,这样可以加快构建速度)

    gitlab-ci.yml 文件的编写说明:

    https://docs.gitlab.com/ee/ci/yaml/README.html

    2.一个job 包含的基本元素:

        stage

        script : 最重要!这下面的脚本会在runner安装的服务器上执行;默认在runner 的工作目录下, 且runner工作目录下默认有打标签的最新分支的代码

        tag : runner tag

        only:

        except:

        示例:只在打tags 的branch 上运行, 只在 branch 上打 tags, 不要在 master 上打 tag   ,因为 master 也算一个分支

        only:

            - tags

        参考:https://www.jianshu.com/p/3c0cbb6c2936

        https://segmentfault.com/a/1190000011890710

         

  • 相关阅读:
    source insight快捷键及使用技巧
    HTTP 状态码
    select poll epoll三者之间的比较
    服务器程序后台化以及守护进程的编写规范
    Linux 信号表
    Linux下有线无线网络配置------命令模式
    浅谈 qmake 之 pro、pri、prf、prl文件
    Python VUE 基础知识
    VUE 实现tab切换页面效果
    爬虫框架:scrapy
  • 原文地址:https://www.cnblogs.com/Agnes1994/p/10549929.html
Copyright © 2011-2022 走看看