pipeline { agent any stages { stage('Checking the dev branch on linux repository') { steps { script { // <--- Added script block if (isUnix()) { echo "Unix" echo "dev" sh 'ls -lha' } else { echo "Windows" } } } } } }