<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] > [官方 doc](https://docs.gitlab.com/ee/ci/yaml/README.html) ## 配置模版 <details> <summary>.gitlab-ci.yml</summary> ``` stages: - install_deps - test - build - deploy_test - deploy_production cache: key: ${CI_BUILD_REF_NAME} paths: - node_modules/ - dist/ # 安裝依賴 install_deps: stage: install_deps only: - develop - master script: - npm install # 運行測試用例 test: stage: test only: - develop - master script: - npm run test # 編譯 build: stage: build only: - develop - master script: - npm run clean - npm run build:client - npm run build:server # 部署測試服務器 deploy_test: stage: deploy_test only: - develop script: - pm2 delete app || true - pm2 start app.js --name app # 部署生產服務器 deploy_production: stage: deploy_production only: - master script: - bash scripts/deploy/deploy.sh ``` </details> <br/> * stages:定義構建階段,這里只有一個階段 deploy * deploy:構建階段 deploy 的詳細配置也就是任務配置 * script:需要執行的 shell 腳本 * only:這里的 master 指在提交到 master 時執行 * tags:與注冊 runner 時的 tag 匹配 ## 字段說明 ## 關鍵字 |關鍵字| 是否必須 |描述| |---|---|---| |image| no| 使用的docker鏡像。詳見| |services |no| 使用的docker服務。詳見| |stages |no| 定義構建場景| |types |no| stages的別名(不贊成使用)| |before_script |no| 定義每個任務的腳本啟動前所需執行的命令| |after_script |no| 定義每個任務的腳本執行結束后所需執行的命令| |variables |no| 定義構建變量| |cache |no| 定義哪些文件需要緩存,讓后續執行可用| Job 關鍵詞 |關鍵字| 是否必須 |描述| |---|---|---| |script |yes| Runner執行的命令或腳本。可以包含多條命令| |image |no| 使用的docker鏡像。[詳見](https://links.jianshu.com/go?to=https%3A%2F%2Fdocs.gitlab.com%2Fce%2Fci%2Fdocker%2FREADME.html)| |services |no| 使用的docker服務。[詳見](https://links.jianshu.com/go?to=https%3A%2F%2Fdocs.gitlab.com%2Fce%2Fci%2Fdocker%2FREADME.html)| |stage |no| 定義job stage(默認:test)| |type |no| stage的別名(已棄用)| |variables |no| 定義job級別的變量| |only |no| 定義一列git分支,并為其創建job| |except |no| 定義一列git分支,不創建job| |tags |no| 定義一列tags,用來指定選擇哪個Runner(同時Runner也要設置tags)| |allow_failure |no| 允許job失敗。失敗的job不影響commit狀態| |when |no| 定義何時開始job。可以是on_success,on_failure,always或者manual| |dependencies |no| 定義job依賴關系,這樣他們就可以互相傳遞artifacts| |cache |no| 定義應在后續運行之間緩存的文件列表| |before_script |no| 重寫一組在作業前執行的命令| |after_script |no| 重寫一組在作業后執行的命令| |environment |no| 定義此作業完成部署的環境名稱| |coverage |no| 定義給定作業的代碼覆蓋率設置| **only**and**except**保留字 |關鍵字| 描述| |---|---|---| |branches| 當一個分支被push上來| |tags| 當一個打了tag的分支被push上來| |api| 當一個pipline被piplines api所觸發調起,詳見piplines api| |external| 當使用了GitLab以外的CI服務| |pipelines| 針對多項目觸發器而言,當使用CI_JOB_TOKEN并使用gitlab所提供的api創建多個pipelines的時候| |pushes| 當pipeline被用戶的git push操作所觸發的時候| |schedules| 針對預定好的pipline而言(每日構建一類)| |triggers| 用token創建piplines的時候| |web| 在GitLab頁面上Pipelines標簽頁下,你按了run pipline的時候|
                  <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>

                              哎呀哎呀视频在线观看