Jenkins コンソール出力でシェル スクリプトを使用して各行の先頭にサーバー名を出力する方法。Active Choices パラメータ プラグインから sd009.domain.com、sw009.domain.com などのパラメータとして Servernames を取得しています
実際の出力:
ssh -o stricthostkeychecking = no domain@server 'ls -lrt'
ssh -o stricthostkeychecking = no domain@server 'pwd'
ssh -o stricthostkeychecking = no domain@server 'hostname'
PS_EXE="/cygdrive/windows/powershell.exe"
私の期待される出力:
sd09.domain.com ssh -o stricthostkeychecking = no domain@server 'ls -lrt'
sd09.domain.com ssh -o stricthostkeychecking = no domain@server 'pwd'
sd09.domain.com ssh -o stricthostkeychecking = no domain@server 'hostname'
sd09.domain.com PS_EXE="/cygdrive/windows/powershell.exe"
上記のように、シェル実行ブロックでシェルスクリプトコードを使用して、選択したサーバー名をすべての出力行に表示する必要があることを確認してください。これを早期に達成するために私を助けてください。