一時的なボリューム

Updated 2 years ago by Admin

一時マウントは、パイプラインがスターになる前に作成され、パイプラインが完了すると破棄されるDocker ボリュームです。これを使用して、パイプラインステップ間でファイルまたはフォルダを共有できます。

   1  kind: pipeline
2 type: kubernetes
3 name: default
4
5 steps:
6 - name: test
7 image: golang
8 volumes:
9 - name: cache
10 path: /go
11 commands:
12 - go get
13 - go test
14
15 - name: build
16 image: golang
17 volumes:
18 - name: cache
19 path: /go
20 commands:
21 - go build
22
23 volumes:
24 - name: cache
25 temp: {}

tmpfsを使用すると、頻繁に読み書きされるファイルをハードドライブではなくメモリに保存することで、パイプラインを高速化できます。

   1  kind: pipeline
2 type: kubernetes
3 name: default
4
5 steps:
6 - name: test
7 image: golang
8 volumes:
9 - name: cache
10 path: /cache
11 commands:
12 - go get
13 - go test
14
15 volumes:
16 - name: cache
17 temp:
18 medium: memory


How did we do?