Having same repository name in two regions while not using AWS_PROFILE causes deployment to fail

Issue #17 new
Alex Ich created an issue

Hello, thank you for your plugin.

Currently cache is generated of registry:profile. We are not using profiles but have two same named repositories in different regions and if we just switch them using AccessKey/Region environment variables the deployment breaks. To avoid it we either mock it with changing profile that we don’t really use or delete cache file - both are not really ideal.

protected File getCredentialFile() {
       new File("${credFileDirectory}/ecr-${md5(registryId + COLON_SEPARATOR + profile)}.properties")
   }

I see two options here:

  1. add region to the cache key (registryId:COLON_SEPARATOR:region:COLON_SEPARATOR:profile)
  2. another option that we thought of → if we put cache key inside of gradle build folder, rather than .gradle then you can clean it using gradle clean

Cheers,

Alex

Comments (0)

  1. Log in to comment