Temporary Volumes

Updated 2 years ago by Admin

Temporary mounts are docker volumes that are created before the pipeline starts and destroyed when the pipeline completes. This can be used to share files or folders among pipeline steps.

1   kind: pipeline
2 type: docker
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: {}


How did we do?