Drone plugins > AWS ECR
amazon_ecr.svg

AWS ECR

by drone-plugins


The ECR plugin can be used to build and publish images to the Amazon ECR registry.

Example

kind: pipeline
name: default

steps:
- name: publish  
  image: plugins/ecr
  settings:
    access_key: a50d28f4dd477bc184fbd10b376de753
    secret_key: bc5785d3ece6a9cdefa42eb99b58986f9095ff1c
    repo: bar
    registry: <account_id>.dkr.ecr.us-east-1.amazonaws.com

Properties

  • access_key

    stringrequired

    AWS access key.

    Secret recommended

    Default: none

  • secret_key

    stringrequired

    AWS secret key.

    Secret recommended

    Default: none

  • create_repository

    booleanoptional

    Create repository if it does not exist.

    Default: false

  • region

    stringoptional

    AWS region.

    Default: us-east-1

  • repo

    stringrequired

    repository name for the image.

    Default: none

  • lifecycle_policy

    stringoptional

    filename of ecr lifecycle json policy.

    Default: none

  • repository_policy

    stringoptional

    filename of ecr repository json policy.

    Default: none

  • tags

    arrayoptional

    repository tag for the image, defaults to latest.

    Default: latest

  • dockerfile

    stringoptional

    filename of dockerfile.

    Default: Dockerfile

  • auth

    stringoptional

    auth token for the registry.

    Secret recommended

    Default: none

  • context

    stringoptional

    context directory for the dockerfile.

    Default: rot of the git repo

  • force_tag

    booleanoptional

    replace existing matched image tags.

    Default: false

  • insecure

    booleanoptional

    enable insecure communication to this registry.

    Default: false

  • mirror

    stringoptional

    use a mirror registry instead of pulling images directly from the central Hub.

    Default: none

  • bip

    booleanoptional

    use for pass bridge ip.

    Default: false

  • custom_dns

    stringoptional

    set custom dns servers for the container.

    Default: none

  • storage_driver

    stringoptional

    supports aufs, overlay or vfs drivers.

    Default: none

  • build_args

    arrayoptional

    custom arguments passed to docker build.

    Default: none

  • scan_on_push

    booleanoptional

    boolean of whether to enable automatic ECR images vulnerabilities scanning for repository if it was created with create_repository=true.

    Default: false