Skip to content

Instantly share code, notes, and snippets.

@mcoffin
Last active February 3, 2017 03:14
Show Gist options
  • Select an option

  • Save mcoffin/79853f2abd5434e924d3e6e078787796 to your computer and use it in GitHub Desktop.

Select an option

Save mcoffin/79853f2abd5434e924d3e6e078787796 to your computer and use it in GitHub Desktop.
Jenkins groovy script for the promoted builds plugin to filter out gitlab merges.
import com.dabsquared.gitlabjenkins.cause.GitLabWebHookCause;
import com.dabsquared.gitlabjenkins.cause.CauseData;
GitLabWebHookCause cause = build.getCause(GitLabWebHookCause.class);
return cause.getData().getActionType().equals(CauseData.ActionType.PUSH);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment