Environment
```text
Jenkins: 2.361.4
OS: Linux - 5.15.0-1023-aws
Java: 11.0.18 - Ubuntu (OpenJDK 64-Bit Server VM)
```
Getting the below error while running withAWS command on jenkins inbound-agent docker container.
Requesting assume role
Assuming role ARN is arn:aws:iam::xxxxxxxxxxxxxxxxx:role/cross-account-roleAssumed role arn:aws:sts::xxxxxxxxxxxxxx:assumed-role/cross-account-role/Jenkins-59 with id xxxxxxxxxxxxxxx:Jenkins-xxxxxxxxx-59
[Pipeline] {
[Pipeline] }
[Pipeline] // withAWS
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] End of Pipeline
java.lang.NoSuchMethodError: No such DSL method 'AWS' found among steps
Should assume the role successfully and run the aws cli command
Actual Results
Got below error output
Requesting assume role
Assuming role ARN is arn:aws:iam::xxxxxxxxxxxxxxxxx:role/cross-account-roleAssumed role arn:aws:sts::xxxxxxxxxxxxxx:assumed-role/cross-account-role/Jenkins-59 with id xxxxxxxxxxxxxxx:Jenkins-xxxxxxxxx-59
[Pipeline] {
[Pipeline] }
[Pipeline] // withAWS
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] End of Pipeline
java.lang.NoSuchMethodError: No such DSL method 'AWS' found among steps
Jenkins and plugins versions report
Environment
```text Jenkins: 2.361.4 OS: Linux - 5.15.0-1023-aws Java: 11.0.18 - Ubuntu (OpenJDK 64-Bit Server VM) ```Getting the below error while running withAWS command on jenkins inbound-agent docker container.
What Operating System are you using (both controller, and any agents involved in the problem)?
Controller OS: Linux Agent: jenkins inbound-docker agent (https://hub.docker.com/r/jenkins/inbound-agent/)
Reproduction steps
stage('List staging eks cluster') { agent { label 'jenkins-jnlp' } steps { withAWS(roleAccount:'xxxxxxxxxx', role:'cross-account-role') { AWS("--region=eu-north-1 eks list-clusters") } } } }
Expected Results
Should assume the role successfully and run the aws cli command
Actual Results
Got below error output
Requesting assume role Assuming role ARN is arn:aws:iam::xxxxxxxxxxxxxxxxx:role/cross-account-roleAssumed role arn:aws:sts::xxxxxxxxxxxxxx:assumed-role/cross-account-role/Jenkins-59 with id xxxxxxxxxxxxxxx:Jenkins-xxxxxxxxx-59 [Pipeline] { [Pipeline] } [Pipeline] // withAWS [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // withEnv [Pipeline] End of Pipeline java.lang.NoSuchMethodError: No such DSL method 'AWS' found among steps
Anything else?
No response