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

         

  • 相关阅读:
    版本管理系统:svn和git
    Java学习笔记七 常用API对象三
    Java学习笔记六 常用API对象二
    Java学习笔记五 常用API对象一
    Java学习笔记三.3
    Java学习笔记三.2
    Java学习笔记三
    析构函数总结
    C++之类的构造函数,不得不学明白的重点
    C++拷贝构造函数(深拷贝,浅拷贝)
  • 原文地址:https://www.cnblogs.com/Agnes1994/p/10549929.html
Copyright © 2011-2022 走看看