Open robertcsakany opened 5 years ago
Hi @robertcsakany ,
I'm also started to use the plugin. You have to use the Drone 1.0+ syntax to configure it. So this should work:
---
kind: pipeline
name: default
steps:
- name: restore-cache
image: homerovalle/drone-gcs-cache
pull: always
environment:
GCS_CACHE_JSON_KEY:
from_secret: your_google_service_account_json
settings:
bucket: drone-agent-m2-cache
restore: true
- name: build-artifacts
pull: default
image: maven:3.6.2-jdk-8
commands:
- mvn -s .maven.xml --no-transfer-progress clean package
environment:
M2_HOME: ${DRONE_WORKSPACE}/.m2
MAVEN_HOME: ${DRONE_WORKSPACE}/.m2
secrets:
- sonatype_username
- sonatype_password
- gpg_keyname
- gpg_executable
- gpg_passphrase
- github_access_token
- blackbelt_nexus_username
- blackbelt_nexus_username
when:
event:
- push
- pull_request
- name: rebuild-cache
image: homerovalle/drone-gcs-cache
pull: always
environment:
GCS_CACHE_JSON_KEY:
from_secret: your_google_service_account_json
settings:
bucket: drone-agent-m2-cache
rebuild: true
mount: .m2
when:
event: push
- name: flush_cache
image: homerovalle/drone-gcs-cache
pull: always
environment:
GCS_CACHE_JSON_KEY:
from_secret: your_google_service_account_json
settings:
bucket: drone-agent-m2-cache
flush: true
flush_age: 31
Good luck!
I've added the key file to organization:
drone orgsecret add xxxxxxx gcs_cache_json_key @gcloud.json
I have this drone file:
And I'm getting the following error:
I've checked the code and seems the 'restore' is not defined.
Any idea?