Drone plugins > Image Migration

Image Migration

by harness


This plugin allows you to migrate a docker image from one registry to another. Supports AWS ECR, GCR, and Docker Hub.

Example

kind: pipeline
name: default
steps:
- steps:
  name: image_migration
  image: plugins/image-migration
  settings:
    source: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/gitness-dev:1.2.3
    destination: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/gitness-prod:1.2.3
    username: AWS
    aws_access_key_id: "012345678901" 
    aws_secret_access_key: <+secrets.getValue("aws_secret_access_key")>
    aws_region: us-west-2
    overwrite: true

Properties

  • source

    stringrequired

    the source image to be copied

    Default: none

  • username

    stringrequired

    destination registry username

    Default: none

  • password

    stringoptional

    destination registry PAT / access token

    Secret recommended

    Default: none

  • destination

    stringrequired

    destination where the image will be copied

    Default: none

  • source_username

    stringoptional

    source registry username (if different from destination)

    Default: none

  • source_password

    stringoptional

    source registry PAT / access token (if different from destination)

    Secret recommended

    Default: none

  • aws_access_key_id

    stringoptional

    AWS access key ID (if using AWS)

    Secret recommended

    Default: none

  • aws_secret_access_key

    stringoptional

    AWS secret access key (if using AWS)

    Secret recommended

    Default: none

  • aws_region

    stringoptional

    AWS region (if using AWS)

    Default: none

  • overwrite

    booleanoptional

    overwrite the destination image if it already exists

    Default: false

  • insecure

    booleanoptional

    allow insecure image transfer

    Default: false