Quantcast
Channel: 小惡魔 – 電腦技術 – 工作筆記 – AppleBOY
Viewing all articles
Browse latest Browse all 325

[Drone] 將單一 Job 分配到多台機器,降低部署執行時間

$
0
0

drone multiple machine

在傳統 CI/CD 流程,都是會在同一台機器上進行,所以當有一個 Job 吃了很大的資源時,其他工作都必須等待該 Job 執行完畢,釋放出資源後,才可以繼續進行。現在 Drone 推出一個新功能,叫做 Multiple Machine 機制,現在開發者可以將同一個 Job 內,拆成很多步驟,將不同的步驟丟到不同機器上面去執行,降低部署執行時間,假設現在有兩台機器 A 及 B,你可以將前端的測試丟到 A 機器,後端的測試,丟到 B 機器,來達到平行處理,並且享受兩台機器的資源,在沒有這機制之前,只能在單一機器上面跑平行處理,沒有享受到多台機器的好處。

影片介紹

實際範例

底下來看看如何將前端及後端的工作拆成兩台機器去跑:

kind: pipeline
name: frontend

steps:
- name: build
  image: node
  commands:
  - npm install
  - npm test

---
kind: pipeline
name: backend

steps:
- name: build
  image: golang
  commands:
  - go build
  - go test

services:
- name: redis
  image: redis

簡單設定兩個不同的 pipeline,就可以將兩條 pipeline 流程丟到不同機器上面執行。上述平行執行後,可以透過 depends_on 來等到上述兩個流程跑完,再執行。

---
kind: pipeline
name: after

steps:
- name: notify
  image: plugins/slack
  settings:
    room: general
    webhook: https://...

depends_on:
- frontend
- backend

Viewing all articles
Browse latest Browse all 325

Trending Articles


Girasoles para colorear


mayabang Quotes, Torpe Quotes, tanga Quotes


Tagalog Quotes About Crush – Tagalog Love Quotes


OFW quotes : Pinoy Tagalog Quotes


Long Distance Relationship Tagalog Love Quotes


Tagalog Quotes To Move on and More Love Love Love Quotes


5 Tagalog Relationship Rules


Best Crush Tagalog Quotes And Sayings 2017


Re:Mutton Pies (lleechef)


FORECLOSURE OF REAL ESTATE MORTGAGE


Sapos para colorear


tagalog love Quotes – Tiwala Quotes


Break up Quotes Tagalog Love Quote – Broken Hearted Quotes Tagalog


Patama Quotes : Tagalog Inspirational Quotes


Pamatay na Banat and Mga Patama Love Quotes


Tagalog Long Distance Relationship Love Quotes


BARKADA TAGALOG QUOTES


“BAHAY KUBO HUGOT”


Vimeo 10.7.0 by Vimeo.com, Inc.


Vimeo 10.7.1 by Vimeo.com, Inc.