You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using the Launcher type to "Launch agent via execution of command on controller", I try to use the command aws ssm start-session --target $NODE_NAME to create an ssh session with the AWS Systems Manager sessions. I get the following error
$ aws ssm start-session --target $NODE_NAME
An error occurred (ValidationException) when calling the StartSession operation: 1 validation error detected: Value '$NODE_NAME' at 'target' failed to satisfy constraint: Member must satisfy regular expression pattern: ^[a-zA-Z0-9_:-]{1,400}$
ERROR: Unable to launch the agent for FleetCloud i-0870f8fdcb91438b4
java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:459)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:404)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:437)
at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:170)
at hudson.slaves.DelegatingComputerLauncher.launch(DelegatingComputerLauncher.java:64)
at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:298)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
ERROR: Process terminated with exit code 254```
I realize the error tells you exactly what pattern needs to be used, but if we could just use the `$` character as well, it could potentially let this functionality execute as desired.
**Describe the solution you'd like**
On launch if the command could evaluate `$NODE_NAME` as the variable (something like i-XXXXXX) this would let us dynamically spin up jenkins agents and connect to them via AWS SSM.
**Describe alternatives you've considered**
From what I can tell, there doesn't seem to be any way to get the $NODE_NAME without using special character not allowed to be used by the regex pattern.
\
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When using the Launcher type to "Launch agent via execution of command on controller", I try to use the command
aws ssm start-session --target $NODE_NAME
to create an ssh session with the AWS Systems Manager sessions. I get the following errorThe text was updated successfully, but these errors were encountered: