2017-12-01 11:51:11 +02:00
# pipelineExecute
2017-11-24 15:49:20 +02:00
## Description
Loads a pipeline from a git repository. The idea is to set up a pipeline job in Jenkins that loads a minimal pipeline, which in turn loads the shared library and then uses this step to load the actual pipeline.
## Prerequisites
none
## Parameters
| parameter | mandatory | default | possible values |
| -------------------|-----------|-----------------|-----------------|
| `repoUrl` | yes | | |
| `branch` | no | 'master' | |
2017-11-29 09:45:48 +02:00
| `path` | no | 'Jenkinsfile' | |
2017-11-24 15:49:20 +02:00
| `credentialsId` | no | An empty String | |
* `repoUrl` The url to the git repository of the pipeline to be loaded.
* `branch` The branch of the git repository from which the pipeline should be checked out.
2017-11-29 09:45:48 +02:00
* `path` The path to the Jenkinsfile, inside the repository, to be loaded.
2017-11-24 15:49:20 +02:00
* `credentialsId` The Jenkins credentials containing user and password needed to access a private git repository.
## Return value
none
## Side effects
2017-11-28 10:34:54 +02:00
none
2017-11-24 15:49:20 +02:00
## Exceptions
* `Exception`
* If `repoUrl` is not provided.
## Example
```groovy
2017-12-01 11:51:11 +02:00
pipelineExecute repoUrl: "https://github.com/MyOrg/MyPipelineRepo.git", branch: 'feature1', path: 'path/to/Jenkinsfile', credentialsId: 'MY_REPO_CREDENTIALS'
2017-11-24 15:49:20 +02:00
```