原文链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| language: go
go: - "1.8"
before_install: - echo "before_install"
install: - echo "install" - before_script: - echo "before_script"
script: - echo "script"
|
关于Job
的定义,Job
就是一個歷經 TravisCI
生命週期所有步驟的基本單位。
关于Custom job
的实现
引入job:include
的概念
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| 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
的特色以及概念如下
- 由一群
Job
組成
- 只要有一個
Job
失敗,該 Stage
就會被視為失敗
- 只有當該前 Stage 是成功的狀態,才會執行下一個 Stage