Can I run a series of linux commands with Jenkins without deploying an application?

Hello team,

I want to automate running a series of linux commands on a linux environment, either a newly launched ec2 instance with amazonlinux2 ami or a container with amazonlinux2 image. I won’t be deploying an application. Is this something I can accomplish with Jenkins? I basically need Jenkins to launch a new ec2 instance or a container and run some commands, and even possibly terminate the instance/container once it finishes running the commands (this last part is optional). Thank you.

if you can do it on a cli, then you can do it in jenkins really easily.

Jenkins (using the ec2 plugin) can spin you up a new ec2 instance that is running a jenkins agent, so you could do it that way too, but probably wouldn’t be great for any super long running command.