Closed systemfreund closed 7 years ago
@systemfreund - Thanks for the detailed issue. Will take a look. Can you please confirm the exact version you are using?
I am using version 3.1.0 of the plugin and gocd version 17.7.0
Sorry for the delay - Are you setting the environment variables from Go - ie pipeline level environment variables? If so I have found the bug around that.
@systemfreund can you please try the v3.2.0 release and let us know how that works out for you?
Same issue for the material plugin.
Seems to be the case for checking connection for the package material in a pipeline. Even though environment variables are present, the server needs to have the .aws/credentials and .aws/config files.
@varshavaradarajan - which version of the plugin are you on?
v4.0.0
@varshavaradarajan - thanks for taking the time to go on a call. As confirmed on the call, the s3material plugin is working as intended. Will add a feature to pass credentials and region as package configuration though.
I am having a similar issue to the above. I have valid creds in the .aws/credentials, and I have .aws/config setup. I also have the same settings in environment variables, however I get the error:
Could not connect to package repository. Reason(s): Interaction with plugin with id 's3material' implementing 'package-repository' extension failed while requesting for 'check-repository-connection'. Reason: [Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.]
Case 1
GO_SERVER_DASHBOARD_URL
,GO_ARTIFACTS_S3_BUCKET
,AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_REGION
set to correct values in my gocd environment~/.aws/config
and~/.aws/credentials
file present Result:Relevant stacktrace:
Case 2
~/.aws/config
contains:Result:
Relevant stacktrace: (unfortunately it's missing the most interesting part because it's cut-off:
Case 3
~/.aws/config
like in Case 2~/.aws/credentials
contains:Result: now the upload completes successfully
Case 4
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
to invalid valuesResult: upload still completes successfully
So, to summarize:
config
andcredentials
in~/.aws
is missing it doesn't work~/.aws
files are present and correct the environment variables have no effect at all