Skip to content

can't get authentication to work #7

@masterkain

Description

@masterkain

I'm a bit confused here, when I use the latest plugins/ecr on a kubernetes drone pipeline (no multiarch) I have no issues pushing with the same set of credentials.

if I switch to plugins/buildx-ecr I get 403. simplified code follows (.drone.jsonnet):

local DockerRepoSettings(build_args=null) = {
  registry: 'xxxx.dkr.ecr.eu-west-1.amazonaws.com',
  region: 'eu-west-1',
  access_key: {
    from_secret: 'ecr_access_key',
  },
  secret_key: {
    from_secret: 'ecr_secret_key',
  },
  repo: 'databases',
  platform: 'linux/amd64,linux/arm64',
  builder_driver: 'docker-container',
  debug: true,
};
    {
      name: 'push',
      image: 'plugins/buildx-ecr',
      privileged: true,
      settings: DockerRepoSettings(),
    },

build log extract:

#11 [auth] sharing credentials for xxxx.dkr.ecr.eu-west-1.amazonaws.com
#11 DONE 0.0s

#10 exporting to image
#10 pushing layers 1.2s done
#10 pushing manifest for xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15@sha256:3c8d7f97a67eb7b4c720c2abf08da4d5e9154ac72fe9865346f3787951e6ed63
#10 pushing manifest for xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15@sha256:3c8d7f97a67eb7b4c720c2abf08da4d5e9154ac72fe9865346f3787951e6ed63 0.2s done
#10 ERROR: failed to push xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15: failed commit on ref "manifest-sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029": unexpected status from PUT request to https://xxxx.dkr.ecr.eu-west-1.amazonaws.com/v2/databases/manifests/sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029: 403 Forbidden
------
 > exporting to image:
------
WARNING: current commit information was not captured by the build: git was not found in the system: exec: "git": executable file not found in $PATH
ERROR: failed to solve: failed to push xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15: failed commit on ref "manifest-sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029": unexpected status from PUT request to https://xxxx.dkr.ecr.eu-west-1.amazonaws.com/v2/databases/manifests/sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029: 403 Forbidden
exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions