i wrote a plugin to pull image from ecr,but it error Cannot configure both commands and custom attributes [access_id secret_key region]
i had try on ubuntu machine and it works
root@ip-172-20-4-49:/data/play-web# docker run --rm \
> -e PLUGIN_ACCESS_ID="ACCESS_ID" \
> -e PLUGIN_SECRET_KEY="SECRET_KEY" \
> -e PLUGIN_REGION="ap-northeast-1" \
> -v /var/run/docker.sock:/var/run/docker.sock \
> lpf190/drone-pull-ecr:v0.04
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
but in .drone.yaml
pipeline:
pull-from-ecr:
image: lpf190/drone-pull-ecr:v0.04
access_id: ${ecr_access_key} # set a secret key in UI
secret_key: ${ecr_secret_key} # set a secret key in UI
region: ap-northeast-1
commands:
- docker pull ulr:images
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: push
error on UI
Cannot configure both commands and custom attributes [access_id secret_key region]
when i comment commands: [ docker pull ulr:images ]
the error is