Temporary Volumes
Temporary mounts are docker volumes that are created before the pipeline stars and destroyed when the pipeline completes. The can be used to share files or folders among pipeline steps.
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
can be used to speed up pipelines by storing files frequently wrote and read in memory instead of hard drive.
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