简体   繁体   中英

How to define trigger source in jenkinsfile

My Jenkinsfile is built from several stages and can be triggered by the scheduler or via push to Gitlab. I would like to use the trigger source in order to skip several stages for a trigger. How can I identify which event triggered the job?

If you mean Push/Merge events, you can check env.gitlabActionType variable .

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