-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails since 1.24 because region is missing #47
Comments
Any helps? |
Using the ecr plugin which uses this plugin, and getting same thing.
|
Same issue here. Is there any help? |
I'm having the same problem using the plugin with
|
Same issue here. It seems like it is not able to pull environment variable or direct jenkins configuration. |
While the plugin behaviour isn't consistent to 1.23, it seems that this is because the region is now being looked up using the SDK default lookup order (using You can get past this behaviour by specifying the region which the Jenkins master should make AWS calls against by specifying it as an argument to the Jenkins service; for example:
Update: I've just submitted a pull request to resolve this issue. See #51 |
@nathandines where exactly do i need to define the region when NOT using pipelines |
@paul-uz If you're talking about defining a region for the STS client on the master to use when assuming a role, then I'd suggest doing something similar to my above comment; Although there aren't many use cases I can think of where that would be required unless you have some specific restrictions on the IAM role which you're using to assume the role. The patch in #51 should cover most use cases. If you're talking about selecting a region for executing your AWS actions against (as I suspect you might be), you'll need to pass in the region to your job using a mechanism supported by the AWS SDK or the tool you're using. Most (all?) of the AWS SDKs tend to support reading the AWS region from the environment variables In any case, setting a region for your jobs is not in the scope of aws-credentials-plugin, this simply exposes credentials for the AWS SDK to use. This particular issue was related to aws-credentials-plugin itself knowing which endpoint to call when assuming a role. |
The jenkins build does not work anymore after the update to 1.24. The stacktrace message says
This is the relevant part of Jenkinsfile, where the build fails
I tried to set the aws variables "AWS_DEFAULT_REGION", "AWS_REGION" and "REGION" (not sure which one is the correct name) to "eu-central-1" (where the application is to be deployed) at different places
withCredentials([ ... ])
withCredentials
into withEnv(['AWS_REGION=eu-central-1']) { ... }withCredentials
into withAWS(region:'eu-central-1') { ... }withCredentials
into withAWS(region: Region.EU_Frankfurt.toString()) { ... }The latter ones look like this, then
Both even display the following log before failing the same ways as above
Any help appreciated, as I were forced to downgrade the plugin to 1.23 to get the build working.
Cheers
The text was updated successfully, but these errors were encountered: