<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] > [阮一峰教程](http://www.ruanyifeng.com/blog/2017/12/travis_ci_tutorial.html) > [各語言的配置](https://docs.travis-ci.com/user/languages/go/) ## 概述 Travis CI 提供的是持續集成服務(Continuous Integration,簡稱 CI)。它綁定 Github 上面的項目 ## 文件配置 ### 簡單的demo ``` language: python script: true // 表示不執行任何腳本,狀態直接設為成功 ``` ### 詳細配置 ``` language: python sudo: required before_install: sudo pip install foo script: py.test ``` ## 運行流程 ### 1.install 階段 1. 該階段用來安裝腳本 `install: ./install-dependencies.sh ` 2. 安裝多個腳本 ``` install: - command1 - command2 ``` >如果安裝失敗會立刻停止 4. 跳過安裝 `install: true ` ### 2.script 階段 1. 執行 `script: bundle exec thor build ` 2. 執行多個腳本 ``` script: - command1 - command2 ``` > 如果command1失敗,command2會繼續執行。但是,整個構建階段的狀態是失敗。 > 如果執行執行就不執行 `script: command1 && command2 ` ## 實例:Node 項目 ``` language: node_js node_js: - "8" #指定版本 ``` Node 項目的install和script階段都有默認腳本,可以省略 * `install`默認值:npm install * `script`默認值:npm test ### 部署 `script`階段結束以后,還可以設置[通知步驟](https://docs.travis-ci.com/user/notifications/)(notification)和[部署步驟](https://docs.travis-ci.com/user/deployment/)(deployment) 要部署到[Github Pages](https://docs.travis-ci.com/user/deployment/pages/) ``` deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard on: branch: master ``` ## 鉤子函數 * before\_install:install 階段之前執行 * before\_script:script 階段之前執行 * after\_failure:script 階段失敗時執行 * after\_success:script 階段成功時執行 * before\_deploy:deploy 步驟之前執行 * after\_deploy:deploy 步驟之后執行 * after\_script:script 階段之后執行 ## 運行狀態 * passed:運行成功,所有步驟的退出碼都是`0` * canceled:用戶取消執行 * errored:`before_install`、`install`、`before_script`有非零退出碼,運行會立即停止 * failed :`script`有非零狀態碼 ,會繼續運行 ## 使用技巧 ### 環境變量 ``` env: - DB=postgres - SH=bash - PACKAGE_VERSION="1.0.*" ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看