https://github.com/drone-plugins/drone-cache
Drone plugin for caching your build workspace
https://github.com/drone-plugins/drone-cache
drone drone-plugin
Last synced: 5 months ago
JSON representation
Drone plugin for caching your build workspace
- Host: GitHub
- URL: https://github.com/drone-plugins/drone-cache
- Owner: drone-plugins
- License: apache-2.0
- Archived: true
- Created: 2015-09-02T18:04:01.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-09-17T19:35:38.000Z (over 6 years ago)
- Last Synced: 2024-06-20T17:44:55.264Z (almost 2 years ago)
- Topics: drone, drone-plugin
- Language: Jsonnet
- Homepage: http://plugins.drone.io/drone-plugins/drone-cache
- Size: 58.6 KB
- Stars: 10
- Watchers: 11
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drone-cache
[](http://cloud.drone.io/drone-plugins/drone-cache)
[](https://gitter.im/drone/drone)
[](https://discourse.drone.io)
[](https://stackoverflow.com/questions/tagged/drone.io)
[](https://microbadger.com/images/plugins/cache "Get your own image badge on microbadger.com")
[](http://godoc.org/github.com/drone-plugins/drone-cache)
[](https://goreportcard.com/report/github.com/drone-plugins/drone-cache)
> Warning: This plugin has not been migrated to Drone >= 0.5 yet, you are not able to use it with a current Drone version until somebody volunteers to update the plugin structure to the new format.
Drone plugin to simply cache the build workspace. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-cache/).
## Build
Build the binary with the following command:
```console
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on
go build -v -a -tags netgo -o release/linux/amd64/drone-cache
```
## Docker
Build the Docker image with the following command:
```console
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/Dockerfile.linux.amd64 --tag plugins/cache .
```
## Usage
```console
docker run --rm \
-e PLUGIN_COMPRESSION=bzip2 \
-e PLUGIN_MOUNT=dist,node_modules \
-v $(pwd):$(pwd) \
-w $(pwd) \
plugins/cache
```