Sign inSign up

spritsail/docker-publish

By spritsail

•Updated 10 months ago

A Drone CI plugin for tagging and pushing built Docker images

Image
0

6.9K

spritsail/docker-publish repository overview

⁠spritsail/docker-publish⁠

Docker Stars Docker Pulls Build Status

latest - (Dockerfile)⁠

⁠Configuration

pipeline:
  ..

  publish:
    image: spritsail/docker-publish
    volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
    secrets: [ docker_username, docker_password ]
    from: local-built-image
    repo: spritsail/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
  • 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

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

produces the following

beta-2
beta-2.8
beta-2.8.243

Tag summary

Content type

Image

Digest

sha256:48b0884ce…

Size

72.5 MB

Last updated

10 months ago

docker pull spritsail/docker-publish