From 6b036af844bc691fa61b27e320b93db98e49ab09 Mon Sep 17 00:00:00 2001 From: Mateusz Jaje Date: Fri, 18 May 2018 12:01:03 +0200 Subject: [PATCH] added creation of pipelineTriggerHandler in onPost(PipelineHook) because missing of it was causing NPE during processing pipeline hook --- .../java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java b/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java index 4a77d19..62ea5ea 100644 --- a/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java +++ b/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java @@ -432,6 +432,9 @@ public class GitLabPushTrigger extends Trigger> { // executes when the Trigger receives a pipeline event public void onPost(final PipelineHook hook) { + if (pipelineTriggerHandler == null) { + initializeTriggerHandler(); + } pipelineTriggerHandler.handle(job, hook, ciSkip, branchFilter, mergeRequestLabelFilter); }