jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
404 stars 159 forks source link

Multibranch-pipeline repeatedly prints contributed variables #184

Closed Swiftwork closed 7 months ago

Swiftwork commented 3 years ago

Multibranch-pipeline seemingly prints contributed variables for every single step. This behavior is observed across all pipeline implementations regardless of steps used.

Configuration DSL:

String getJobName() {
  def parts = env.JOB_NAME.tokenize('/') as String[]
  return parts.length < 2 ? env.JOB_NAME : parts[parts.length - 2]
}

// ...

GenericTrigger(
  genericVariables: [
    [key: 'ref', value: '$.ref'],
    [key: 'message', value: '$.head_commit.message'],
    [key: 'author', value: '$.head_commit.author.name']
  ],
  causeString: 'Triggered on $ref by $author using GitHub webhook',
  regexpFilterText: '$ref $message',
  regexpFilterExpression: 'refs/heads/' + env.BRANCH_NAME + ' (?!.*\\[skip ci\\]).*', // This branch and all except [skip ci]
  printContributedVariables: true,
  token: getJobName()
)

Log excerpt: image

Unfortunately I can't share the pipelines as these are "proprietary". Can you reproduce the same results with the above configuration?

tomasbjerre commented 7 months ago

Should be fixed now in 1.88.1 open issue again if not working.