Heap-ResourceType to internally keep data between Jobs


#1

Hi,

I created a resource type, which keeps data on file system.

I often have situations where a job creates “something”, which is required as input by (multiple) other job(s), but does not need to be deployed.

The idea is simple, on put versions are incremented and data is stored into a directory with that version number as path. On get the data from that path is returned. The idea is to allow to locally store data without having to upload / push / whatever to a “far” external service (and without the pain of login/keys and configuration).

Now there is a problem: How can I define a volume, which is mounted into the resource?

The code can be found in the following repository: https://github.com/0815fox/concourse-heap-resource - the example is self-explanatory, but it does not work, probably because the get and put commands are not ran in the same container and the data is not kept in a volume.

Of course this will only work if the data volume is also shared between the hosts running the workers.

Greetings,
Michael