Use this plugin to build and push Docker images to the Google Container Registry (GCR). Please read the GCR documentation before you begin. You will need to generate a JSON token to authenticate to the registry and push images.
The following parameters are used to configure this plugin:
debug
- enable debug mode.dry-run
- enable dry-run, push is skipped.registry
- authenticates to this registry (defaults togcr.io
).auth_key
- json authentication key for service account.storage_driver
- useaufs
,devicemapper
,btrfs
oroverlay
driver.repo
- repository name for the image.tag
- repository tag for the image (defaults tolatest
).dockerfile
- user custom Dockerfile (defaults toDockerfile
).context
- docker context dir (defauults to.
).args
- docker build args.
Sample configuration:
publish:
image: foo/drone-gcr
repo: foo/bar
auth_key: >
{
"private_key_id": "...",
"private_key": "...",
"client_email": "...",
"client_id": "...",
"type": "..."
}
Sample configuration using multiple tags:
publish:
image: foo/drone-gcr
repo: foo/bar
tag:
- latest
- "1.0.1"
- "1.0"
auth_key: >
{
"private_key_id": "...",
"private_key": "...",
"client_email": "...",
"client_id": "...",
"type": "..."
}
When setting your token in the .drone.yml
file you must use folded block scalars to avoid parsing errors:
publish:
auth_key: >
{
"private_key_id": "...",
"private_key": "...",
"client_email": "...",
"client_id": "...",
"type": "..."
}
When injecting secrets you must also use a folded block scalar:
publish:
auth_key: >
${GCR_AUTH_KEY}