Pushing git tags throws error in control freak

Issue #198 resolved
Former user created an issue

Currently we use control freak to prevent commit messages without a JIRA ticket associated with them. We also use jql to ensure that the JIRA ticket in question is open and of a certain type.

However, in our jenkins automation, after changes are merged to develop, the build will tag the develop branch with the new version. If the JIRA ticket that was merged gets closed prior to the git tag getting pushed in jenkins, control freak throws a NullPointerException. This doesn't appear to happen when the merged ticket hasn't been marked done when the tag push occurs.

Here's the exception we are seeing:

16:45:13  + git tag -f -a 122.0.0 -m '[NO-JIRA] Tagging version 122.0.0'
16:45:14  + git push origin -f 122.0.0
16:45:16  remote: Control Freak v2020.12.10: java.lang.NullPointerException: argument        
16:45:16  remote: java.lang.NullPointerException: argument        
16:45:16  remote:   at java.util.Objects.requireNonNull(Objects.java:228)        
16:45:16  remote:   at com.atlassian.bitbucket.scm.AbstractCommandBuilder.notBlank(AbstractCommandBuilder.java:696)        
16:45:16  remote:   at com.atlassian.bitbucket.scm.AbstractCommandBuilder.notBlank(AbstractCommandBuilder.java:681)        
16:45:16  remote:   at com.atlassian.bitbucket.scm.AbstractCommandBuilder.argument(AbstractCommandBuilder.java:171)        
16:45:16  remote:   at com.bitbooster.hook.RebaseHelper.runGitCherry(RebaseHelper.java:140)        
16:45:16  remote:   at com.bitbooster.hook.RebaseHelper.skipRebasedCommits(RebaseHelper.java:80)        
16:45:16  remote:   at com.bitbooster.hook.ControlFreakHook.jiraPolicyCheck(ControlFreakHook.java:1612)        
16:45:16  remote:   at com.bitbooster.hook.ControlFreakHook.validateChange(ControlFreakHook.java:1071)        
16:45:16  remote:   at com.bitbooster.hook.ControlFreakHook.processReceive(ControlFreakHook.java:563)        
16:45:16  remote:   at com.bitbooster.hook.ControlFreakPreReceive.preUpdate(ControlFreakPreReceive.java:141)        
16:45:16  remote: 

We have tried setting the Apply Jira Policy Against for Tags on and off and it seems to have had no affect on this issue.

Comments (1)

  1. Log in to comment