简体   繁体   中英

How to get information about the trigger of a gitea webhook in a Jenkinsfile?

I have a Gitea and a Jenkins server. I installed Gitea plugin in Jenkins and set-up a multibranch pipeline which itself adds a webhook to the gitea repo. That works great, but the Jenkins pipeline will not build if a new tag was added. I wanted to add another webhook to do so.

As far as I can tell there is a webhook event for creation of branches and tags.

Is there a way to get the payload of the webhook in a Jenkinsfile to find out if there was a new tag added?

The Jenkins GitLab plugin makes the webhook payload information available in the Jenkins Global Variable env , which you can print (see How to list all `env` properties within jenkins pipeline job? )

Maybe this Gitea plugin does the same... have you tried to print all env variables?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM