Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent none
- options {
- buildDiscarder logRotator(numToKeepStr: '10')
- }
- triggers {
- eventTrigger jmespathQuery("repository.full_name")
- }
- stages {
- stage('Example') {
- steps {
- script {
- String text = ''
- env.getEnvironment().each { name, value ->
- text += "$name=$value\n"
- }
- println text
- for(cause in currentBuild.rawBuild.getCauses()) {
- println "${cause}"
- if (cause instanceof com.cloudbees.jenkins.plugins.pipeline.events.EventTriggerCause) {
- println "${cause.event}"
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement