A Drone CI plugin for tagging and pushing built Docker images
353
Dockerfile linkslatest - (Dockerfile)
pipeline:
..
publish:
image: gleez/docker-publish
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
secrets: [ docker_username, docker_password ]
from: local-built-image
repo: gleez/docker-publish
tags:
- latest
This plugin has multiple flexible methods for tagging images:
tags:
- raw-tag
- %auto: 1.5.123
- %file: .tag_file
- %fileauto: .version_file
- %auto: %prefix: beta % 1.2.34
- %file: %prefix: testing % .tag_file
- %fileauto: %prefix: beta % .version_file
- %label: org.label-schema.version
- %labelauto: io.gleez.version.busybox
rawtag is a single, literal tag%file reads a tag out of a file%auto enumerates every major version: e.g. 1.2.34 also produces 1.2 and 1%fileauto is a combination of %file and %auto%label reads the label value from the publishing image as the tag%labelauto is a combination of %label and %autoAdditionally, any of the above can be combined with the extra %prefix: <pre>% argument
to prepend the fixed prefix to all tags that the rule produces.
%fileauto: %prefix: beta% .version_file, with .version_file having 2.8.243
OR
%labelauto: %prefix: beta% org.label-schema.version with org.label-schema.version having 2.8.243
produces the following
beta-2
beta-2.8
beta-2.8.243
This image has support for updating Microbadger metadata with a webhook, after the image(s) have been pushed; simply provide the repo-specific token via a secret to this container and watch it happen.
pipeline:
publish:
image: gleez/docker-publish
secrets: [ microbadger_token ]
..
Content type
Image
Digest
Size
40.8 MB
Last updated
about 8 years ago
docker pull gleez/docker-publish