The same shell command behaves differently if it is located in different stages of Jenkins pipeline
问题 I'm trying to execute following stage in Jenkins pipeline stage('RUN') { steps{ dir("airflow-dags") { sh "find ./volumes/dags/ -maxdepth 1 -name '*.py' -print0" } } } If this stage is located in the last position (after deploy and other stuff) it returns nothing: 08:56:58 Running in /home/jenkins/workspace/QA_deploy_Docker/airflow-dags [Pipeline] { [Pipeline] sh 08:56:59 + find ./volumes/dags/ -maxdepth 1 -name '*.py' -print0 [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // stage If