Jenkin 控制台输出在管道的开始和结束之间不打印任何内容

Jenkin console output not printing anything between start and end of pipeline

我使用管道在 Jenkin 中创建了一个新作业。在此之后,我在 SCM 中提供了 Gitlab 项目 url 和 Jenkinsfile 路径。在构建管道时,我看不到开始管道和结束管道之间的任何消息。 在将无效代码放入 JenkinsFile 时,构建失败,但是当 运行 简单命令(如 echo)时,它不会向控制台打印任何内容。 有什么我遗漏的吗?

控制台输出

[Pipeline] Start of Pipeline
[Pipeline] End of Pipeline
Finished: SUCCESS

詹金斯文件

pipeline { 
agent any 
    stages { 
        stage ('Build') { 
            steps { 
                echo 
                'Running build phase. ' 
            }
        }
    }
}

console output Jenkinsfile code

为了测试,请在 scripted pipeline block:

中尝试相同的回显
        steps { 
            script {
                echo 'Running build phase. '
            }
        }

我建议安装所有必需的插件,然后重新启动您的 Jenkins 服务器,如果您是 运行 在本地,那么重新启动系统可能会有帮助。