如何从jenkins管道发送原始TCP请求?

时间:2018-08-29 18:46:26

标签: jenkins jenkins-plugins jenkins-pipeline

在管道构建步骤中可以使用出色的“ httpRequest”。

但是现在我想发送一个原始的TCP请求,我找不到为此的插件。是否有受支持的插件功能?我想避免为此付出代价。

这是我发出的原始TCP请求的示例:

echo 'abc123 blahblahblah' | nc public.endpoint.com 10514

1 个答案:

答案 0 :(得分:0)

只需将命令放入sh中。这将在您指定的Jenkins const ROOT = realpath(__DIR__ . '/..'); define('ROOT', realpath(__DIR__ . '/..')); 上执行shell命令。

node