Skip to content

Conversation

derrickgw
Copy link

This merge request adds a pipeline function gitlabMergeRequestStatus(projectId, branchName) to retrieve merge request information about any given project/branch.

This would be useful in cases where the pipeline needs to behave differently if there is a merge request open, e.g. running long resource intensive tests only for merge requests, or in pipelines that are triggered by other jobs. This is a partial solution to the fact that Multi-branch pipelines don't get run for merge requests. These values are retrieved directly since they can't be propagated to the multi-branch build.

Ideally this could be tested by having a mock gitlab instance provide canned JSON responses, but I don't know how to accomplish that within the existing framework.

This is WIP to:

  • Gauge interest
  • Get code review
  • Get advice on how to test

@markjacksonfishing
Copy link
Contributor

markjacksonfishing commented Sep 10, 2019

@derrickgw did you run a mvn clean install?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants