Echo in Jenkinsfile

Is echo in the Jenkinsfile is linux specific or related to Jenkins ? If Jenkinsfile support linux commands by default , then what os of linux it supports ?

Hi @dnpuneeth3

echo in Jenkinsfile is Jenkins specific. It’s one of the built-in commands in pipeline syntax.

To run a linux command, assuming your build agent is linux, then use the sh command to execute shell scripts or linux commands, Similarly if your build agent is windows, then the bat command is used to execute fragments of batch file or windows commands.

Please see Pipeline: Nodes and Processes

Pipeline follows groovy syntax right ? But echo is not there in the apache groovy .

It is groovy with language extensions provided by jenkins and its plugins.

It is known as a DSL (domain specific language), and groovy is very good for creating these.