Skip to content

Pipeline Request Trigger REST API

Published: 2024-05-15

Resource Name

/git/checkout

POST

Checkout source or objects from a Git repository when not triggered directly by a repository push Webhook.

Optionally pass a unique tracing key for the pipeline, such as the build ID, to be able to invoke downstream RFP activity and get status updates from MDCMS back to the Pipeline.

Status updates can be performed using the MDUPDPIPE command on *RFP exit point commands.

Request

Path parameters

none

Body parameters

href Required

string

The URL of the Git repository in html or SSH format.  This repository must be already defined in MDOpen and have at least one Continuous Integration or Cross-Referencing element defined for it.

branch  

string

The branch to pull from, if not specified in the URL

userName 

string

The name of the user that committed the changes to Git. This user will then be mapped to a MDCMS user based on the mapping definitions for the Git repository in MDOpen.

oldHash Required

string

the prior commit hash in Git

newHash Required

string

the new commit hash in Git

commitMsg

string

the commit message. If including the task reference in the message, it should be at the very beginning of the message with format:

PROJECT-TASK.SUBTASK:

taskRef

string

the reference of the MDCMS, Jira or Azure task to apply the checkouts to. This can be omitted if the commitMsg starts with the reference id.

pipeline

string

The 10-character ID of a Pipeline server defined in MDOpen. This will be used for downstream update messages to the server using the MDUPDPIPE command.

traceKey

string

A unique key to identify the pipeline build that MDCMS should communicate with. This will be used for downstream update messages to the server using the MDUPDPIPE command.

Example:

{ "href": "ssh://git@bitbucket.org/yourcompany/yourproject", "branch": "main", "userName": "john@doe.com", "oldHash": "a2c8933436a99a4ea90bc0972e7728a4e8bea519", "newHash": "1a0c808bb1aa1886f896d3989645fb6574fc23a8", "commitMsg": "DEMOCH-3: flow demo", "pipeline": "BAMBOO", "traceKey": "YOURPROJECT-37" }

Response

Body parameters

The response provides a structure with the following parameters:

transaction 

string

the transaction number which can be used to find the log record in file MDXREF/MDDFREP

msg

string

a detailed message of the error or successful transaction

Example:

{
   "transaction": "149",
   "msg": "MDFREP submitted to batch"
}