Skip to content
gqlxj1987's Blog
Go back

Travis CI - Step/Job/Stage

Edit page

原文链接

language: go

go:
  - "1.8"

before_install:
  - echo "before_install"

install:
  - echo "install"
  - 
before_script:
  - echo "before_script"

script:
  - echo "script"

travisci steps

关于Job的定义,Job 就是一個歷經 TravisCI 生命週期所有步驟的基本單位。

关于Custom job的实现

custom job

引入job:include的概念

language: go

go:
  - "1.8"
  
before_install:
  - echo "before_install"
install:
  - echo "install"
before_script:
  - echo "before_script"
script:
  - echo "script"

jobs:
  include:
    - stage: Custom Testing
      name: Unit-Testing
      go: "1.8"
      script: echo "unit script"
    - name: Integration-Testing
      before_install: "Integration-Testing_before_install"
      go: "1.9"
      script: "Integration-Testing_script"

Stage 的特色以及概念如下

  1. 由一群 Job 組成
  2. 只要有一個 Job 失敗,該 Stage 就會被視為失敗
  3. 只有當該前 Stage 是成功的狀態,才會執行下一個 Stage

多个stage


Edit page
Share this post on:

Previous Post
孤独的美食家
Next Post
domain drive design