The drone-s3-cache plugin does not work with the aws credentials file or so it seems anyway.
The default expected behavior should be that the aws sdk (this case the aws sdk in go) should try to resolve aws credentials from
~/.aws/credentials. But I’m still getting access denied.
I have verified that it’s not a credentials issue because it works with drone-cache plugin. But I would rather use the drone-s3-cache plugin because it supports flushing cache.
I also tried setting the env variable
/root so that aws will look in
/root/.aws/ for the credentials file, but that didn’t work.
Here’s the drone config:
- name: restore_cache image: plugins/s3-cache settings: debug: true mount: - /root/.m2 region: us-east-1 restore: true root: my_s3_bucket environment: HOME: /root volumes: - name: aws_creds path: /root/.aws - name: m2 path: /root/.m2 depends_on: - get_aws_credentials
get_aws_credentials is the step that populates
/root/.aws with the aws credentials file.
debug option is also not showing anything that is useful.