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
403 stars 159 forks source link

Running sh without filling in a value for Post content parameters will blocking #279

Open mikeygithub opened 10 months ago

mikeygithub commented 10 months ago

Plugin version used

Generic Webhook Trigger Plugin Version1.86.4

Jenkins version used

Jenkins 2.346.3

configuration

If the name is empty, it defaults to '_' Rename variable at the beginning

image

pipeline define

pipeline {
  agent none
  stages {
    stage('deploy') {
      agent {
        docker {
          image 'xxxxx/xxxx:3.1.0'
          args '-v /devops/kubectl:/root/.kube -u root'
        }
      }
      steps {
        sh '''
        echo deploy
        echo "Hello, World!
        feishu post -t ${COMMON_FEISHU_TOKEN} -s ${COMMON_FEISHU_SECRET} start\" -r \"${RUN_DISPLAY_URL}\"
        '''
      }
    }
  }
}

When I use webhook for triggering, once I execute sh, it will enter an infinite blocking state

image

But when I click on build now on Jenkins, it can run normally

image

Finally, I found that as long as I write any value, it can run normally

image

tomasbjerre commented 10 months ago

Thanks for reporting. Good that you found a workaround.