Information on this Jenkins job type. Freestyle jobs are basic compared to pipeline jobs.

  • On your dashboard, click on New Item

  • I have a very barebones Jenkins install, so all I see if a standard Freestyle project.

    • Add a name
    • Click on Freestyle project
    • Click OK
  • Go down to Build Steps and select Execute shell

You should now see a textbox that allows you to write shell code.

ls
ls -ltra /var/jenkins_home/workspace
echo "${NODE_NAME}"
echo "${NODE_LABELS}"
echo "${WORKSPACE}"
  • Select the Save button as shown below.

  • Click the Build Now button to run your job

  • Under Build History, select your job.

  • Click on Console Output to see log file.