我使用 jenkins 管道构建图像并将其推送到我的 aws 注册表。我创建了一个相关的凭证,其类型是名为“aws_credential”的AWS凭证。但我收到错误消息
ERROR: Could not find credentials matching aws_credential
。我的管道是
script.docker.withRegistry(registryUrl, registryCredentialsId) {
def image = script.docker.image(imageName)
image.push()
}
registryCredentialsId
是“aws_credential”,registryUrl
是我的 aws 注册网址。
它读取了我的凭据并成功登录。
好吧,我犯了一个错误,我什至没有安装 Amazon ECR 插件。