以下の内容はhttps://int128.hatenablog.com/entry/2016/10/27/224533より取得しました。


スクリプトコンソール上でSlaveでコマンドを実行する

Jenkinsのスクリプトコンソールを利用すると、Slaveで任意のコマンドを実行できます。具体的には、 RemotingDiagnostics.executeGroovy() メソッドを利用してSlaveでGroovyスクリプトを実行します。

import hudson.util.RemotingDiagnostics

// Slaveノード名
def node = 'node-name'

// 実行したいコマンド
def command = 'uname -a'

println RemotingDiagnostics.executeGroovy("""
def p = '$command'.execute()
p.waitFor()
println p.in.text
""", Jenkins.instance.slaves.find { it.name == node }.channel)



以上の内容はhttps://int128.hatenablog.com/entry/2016/10/27/224533より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14