V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
FenixVu
V2EX  ›  问与答

Jenkinspipeline 如何查看远程机器执行的脚本过程

  •  
  •   FenixVu · 2021-05-06 15:25:30 +08:00 · 542 次点击
    这是一个创建于 1076 天前的主题,其中的信息可能已经有所发展或是发生改变。

    pipeline 最后一步是 通过 Publish Over SSH 插件实现远程自动部署 但是执行的内容并不会在 Jenkins 的控制台里输出( freestyle 的可以)

    [Pipeline] { (远程部署)
    [Pipeline] sshPublisher
    SSH: Connecting from host [4f65f839a738]
    SSH: Connecting with configuration [192.168.2.197] ...
    SSH: EXEC: completed after 2,807 ms
    SSH: Disconnecting configuration [192.168.2.197] ...
    SSH: Transferred 0 file(s)
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
    Finished: SUCCESS
    
    2 条回复    2021-05-06 16:07:53 +08:00
    CRUD
        1
    CRUD  
       2021-05-06 15:55:51 +08:00
    尝试把 verbose 选项设置为 true: https://wiki.jenkins.io/display/JENKINS/Publish+Over#PublishOver-Verboseoutputinconsole

    ```
    sshPublisher(
    continueOnError: false, failOnError: true,
    publishers: [
    sshPublisherDesc(
    configName: "${server}",
    verbose: true,
    transfers: [
    ......
    ]
    )
    ]
    )
    ```
    FenixVu
        2
    FenixVu  
    OP
       2021-05-06 16:07:53 +08:00
    @CRUD 感谢大佬搞定
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3303 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:46 · PVG 20:46 · LAX 05:46 · JFK 08:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.