Unable to set context in Drone plugin drone-gcr (and drone-docker)

692 views Asked by At

Per this bug drone docker plugin question...

And per the documentation...

The context parameter just doesn't work. I keep getting file not found errors in the logs.

How do I set the context in drone-docker and drone-gcr plugins?

name: publish
image: plugins/gcr
settings:
  context: subdirectory
  registry: registry.dev
  repo: repoName
  tag: latest

I've also tried

name: publish
image: plugins/gcr
settings:
  file: Dockerfile
  context: subdirectory
  registry: registry.dev
  repo: repoName
  tag: latest
1

There are 1 answers

0
meh On

You must set the dockerfile flag as well:

name: publish
image: plugins/gcr
settings:
  dockerfile: subdirectory/Dockerfile
  context: subdirectory
  registry: registry.dev
  repo: repoName
  tag: latest