Sign inSign up

gleez/docker-publish

By gleez

•Updated about 8 years ago

A Drone CI plugin for tagging and pushing built Docker images

Image
0

353

gleez/docker-publish repository overview

⁠Gleez/docker-publish⁠

latest - (Dockerfile)⁠

⁠Configuration

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
⁠Tagging

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 %auto

Additionally, 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.

⁠For example:

%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
⁠Microbadger

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 ]
    ..

Tag summary

Content type

Image

Digest

Size

40.8 MB

Last updated

about 8 years ago

docker pull gleez/docker-publish