Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The token can be supplied as a:

  • Request parameter:
curl -vs http://localhost:8080/jenkins/generic-webhook-trigger/invoke?token=abc123 2>&1
  • Token header:


curl -vs -H "token: abc123" http://localhost:8080/jenkins/generic-webhook-trigger/invoke 2>&1
  • Authorization header of type Bearer :

curl -vs -H "Authorization: Bearer abc123" http://localhost:8080/jenkins/generic-webhook-trigger/invoke 2>&1


白名单

白名单可以在Jenkins全局配置页面中配置。白名单将阻止任何未在此列表中配置的对插件的请求。主机可以为空,以允许任何静态IP、CIDR或范围,规则可以如下:

  • 1.2.3.4
  • 2.2.3.0/24
  • 3.2.1.1-3.2.1.10
  • 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • 2002:0db8:85a3:0000:0000:8a2e:0370:7334/127
  • 2001:0db8:85a3:0000:0000:8a2e:0370:7334-2001:0db8:85a3:0000:0000:8a2e:0370:7335

默认值

插件可以配置为默认值。如下所示:

Image RemovedImage Added

但如果手动执行作业(或重播pipeline),则不会使用此默认值。因为插件根本不会被调用。您可以通过检查“this job is parametized”来解决这个问题,并添加一个与在插件中配置的参数同名的参数,如下所示:

...