【问题标题】:display sh script output in confluence using jenkins使用 jenkins 在融合中显示 sh 脚本输出
【发布时间】:2018-12-01 17:19:33
【问题描述】:

我想使用 jenkins 在 confluence 中发布 bash 脚本的输出,每次打开 confluence 中的页面都会更新输出。有没有可能这样做?谢谢

【问题讨论】:

    标签: jenkins jenkins-plugins jenkins-pipeline confluence confluence-rest-api


    【解决方案1】:

    您可以使用 Confluence Rest Api。

    你可以试试这个https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/

    例子:

    curl -u jira_username_login:jira_password -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"new page",
    "space":{"key":"TST"},"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation":
    "storage"}}}' http://localhost:8080/confluence/rest/api/content/ | python -mjson.tool
    

    要获得 bash 输出: How to set a variable to the output of a command in Bash?

    【讨论】:

    • Thx Mukesh M,你有什么想法吗,我如何在 confluence rest api 中插入这个变量(包括 bash 脚本输出)。
    猜你喜欢
    • 1970-01-01
    • 2020-12-24
    • 1970-01-01
    • 2019-09-24
    • 2021-02-24
    • 1970-01-01
    • 1970-01-01
    • 2017-11-26
    • 1970-01-01
    相关资源
    最近更新 更多