Given the following pipeline, I am having trouble getting it to successfully cache the second publish step. If I use the cache_key option, I get the message 'No cache for /drone/docker' no matter how many times I run it. Am I missing something obvious?
pipeline:
restore-cache-base:
image: drillster/drone-volume-cache
restore: true
environment:
STEP_TAG: 'BASE'
cache_key: [ DRONE_REPO_OWNER, DRONE_REPO_NAME, DRONE_BRANCH, STEP_TAG ]
mount:
- /drone/docker
volumes:
- /tmp/cache:/cache
publish-base:
image: plugins/docker
registry: xxxx
repo: yyyy
dockerfile: Dockerfile.base
tags:
- latest
- ${DRONE_COMMIT_BRANCH}
- ${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:8}
secrets:
- docker_username
- docker_password
storage_path: /drone/docker
purge: false
rebuild-cache-base:
image: drillster/drone-volume-cache
rebuild: true
environment:
STEP_TAG: 'BASE'
cache_key: [ DRONE_REPO_OWNER, DRONE_REPO_NAME, DRONE_BRANCH, STEP_TAG ]
mount:
- /drone/docker
volumes:
- /tmp/cache:/cache
restore-cache-zerg:
image: drillster/drone-volume-cache
restore: true
environment:
STEP_TAG: 'ZERG'
cache_key: [ DRONE_REPO_OWNER, DRONE_REPO_NAME, DRONE_BRANCH, STEP_TAG ]
mount:
- /drone/docker
volumes:
- /tmp/cache:/cache
publish-zerg:
image: plugins/docker
registry: xxxx
repo: zzzz
dockerfile: Dockerfile.zerg
tags:
- latest
- ${DRONE_COMMIT_BRANCH}
- ${DRONE_COMMIT_BRANCH}-${DRONE_COMMIT_SHA:0:8}
secrets:
- docker_username
- docker_password
storage_path: /drone/docker
purge: false
rebuild-cache-zerg:
image: drillster/drone-volume-cache
rebuild: true
environment:
STEP_TAG: 'ZERG'
cache_key: [ DRONE_REPO_OWNER, DRONE_REPO_NAME, DRONE_BRANCH, STEP_TAG ]
mount:
- /drone/docker
volumes:
- /tmp/cache:/cache
Given the following pipeline, I am having trouble getting it to successfully cache the second publish step. If I use the cache_key option, I get the message 'No cache for /drone/docker' no matter how many times I run it. Am I missing something obvious?