Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67349

Expose POST Data to Pipeline

XMLWordPrintable

      Expose the received POST data from the calling gitea server like the Generic Webhook Trigger Plugin does.

      triggers {
        GenericTrigger(
          genericVariables: [
            [expressionType: 'JSONPath', key: 'body', value: '$'],
            [expressionType: 'JSONPath', key: 'reference', value: '$.ref'],
            [expressionType: 'JSONPath', key: 'referenceType', value: '$.ref_type']
          ],
          regexpFilterText: '',
          regexpFilterExpression: ''
        )
      }
      
      stages {
        stage('Testing') {
          steps {
            sh 'echo $body'
            sh 'echo $ref'
            sh 'echo $ref_type'
          }
        }
      }
      

      That would be great.

            Unassigned Unassigned
            jgk Juergen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: