Workflow Editor
In the Workflow Editor
section, you can configure a job pipeline to be executed. Pipelines can be configured to be triggered automatically or manually based on code change or time.
After adding Git repo in the
Source Code
section, go to theWorkflow Editor
.Click
Job Pipeline
.Provide the information in the following fields on the Create job pipeline page:
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreate-job%2Fcreate-job-pipeline-basic.jpg&width=768&dpr=4&quality=100&sign=28453a12&sv=1)
Field Name | Required/Optional | Description |
---|---|---|
Pipeline Name | Required | A name for the pipeline |
Source type | Required | Source type to trigger the job pipeline. Available options: Branch Fixed | Branch Regex |Pull Request | Tag Creation |
Branch Name | Required | Branch that triggers the job pipeline. |
Click Create Pipeline.
The job pipeline is created.
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreate-job%2Fjob-pipeline-created.jpg&width=768&dpr=4&quality=100&sign=1ac1edef&sv=1)
To trigger job pipeline, go to the Trigger Job section.
Note
: You can create more than one job pipeline by clicking + Job Pipeline.
Source type: Branch Fixed
The Source type - "Branch Fixed" allows you to trigger a CI build whenever there is a code change on the specified branch.
Select the Source type as "Branch Fixed" and enter the Branch Name.
Source type: Branch Regex
Branch Regex
allows users to easily switch between branches matching the configured Regex before triggering the build pipeline. In case of Branch Fixed
, users cannot change the branch name in ci-pipeline unless they have admin access for the app. So, if users with Build and Deploy
access should be allowed to switch branch name before triggering ci-pipeline, Branch Regex
should be selected as source type by a user with Admin access.
For example if the user sets the Branch Regex as feature-*
, then users can trigger from branches such as feature-1450
, feature-hot-fix
etc.
Source type: Pull Request
The Source type - "Pull Request" allows you to configure the CI Pipeline using the PR raised in your repository.
Before you begin, configure the webhook for either GitHub or Bitbucket.
The "Pull Request" source type feature only works for the host GitHub or Bitbucket cloud for now. To request support for a different Git host, please create a github issue here.
To trigger the build from specific PRs, you can filter the PRs based on the following keys:
Filter key | Description |
---|---|
| Author of the PR |
| Branch from which the Pull Request is generated |
| Branch to which the Pull request will be merged |
| Title of the Pull Request |
| State of the PR. Default is "open" and cannot be changed |
Select the appropriate filter and pass the matching condition as a regular expression (regex
).
Devtron uses regexp library, view regexp cheatsheet. You can test your custom regex from here.
Source type: Tag Creation
The Source type - "Tag Creation" allows you to build the CI pipeline from a tag.
Before you begin, configure the webhook for either GitHub or Bitbucket.
To trigger the build from specific tags, you can filter the tags based on the author
and/or the tag name
.
Filter key | Description |
---|---|
| The one who created the tag |
| Name of the tag for which the webhook will be triggered |
Select the appropriate filter and pass the matching condition as a regular expression (regex
).
Add Preset Plugins
![](https://docs.devtron.ai/~gitbook/image?url=https%3A%2F%2Fdevtron-public-asset.s3.us-east-2.amazonaws.com%2Fimages%2Fcreate-job%2Fcreate-job-pipeline-add-tasks.jpg&width=768&dpr=4&quality=100&sign=30977bc0&sv=1)
You can also add preset plugins in your job pipeline to execute some standard tasks, such as Code analysis, Load testing, Security scanning etc. Click Add Task
to add preset plugins.
Update Job Pipeline
You can update the configurations of an existing Job Pipeline except for the pipeline's name. To update a pipeline, select your job pipeline. In the Edit job pipeline window, edit the required fields and select Update Pipeline.
Delete Job Pipeline
You can only delete a job pipeline in your workflow.
To delete a job pipeline, go to Configurations > Workflow Editor and select Delete Pipeline.
Last updated