jenkinsci / jenkinsci/gitlab-plugin
Support pipelineTriggers API for GitLab triggers in Job DSL
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
### What feature do you want to see added?
Currently, when defining Jenkins pipeline jobs using Job DSL, the GitLab plugin requires the deprecated syntax:
```
triggers {
gitlabPush {
buildOnMergeRequestEvents(true)
buildOnPushEvents(true)
enableCiSkip(true)
}
}
```
This generates deprecation warnings in Job DSL seed jobs:
Warning: triggers is deprecated
**Problem**:
Job DSL now prefers properties { pipelineTriggers { ... } } for defining triggers.
The GitLab plugin (v1.9.9) does not currently support this API.
Users are forced to continue using the deprecated syntax, creating warnings and reducing clarity.
**Impact**:
Seed job logs are noisy due to warnings.
Encourages continued use of deprecated DSL constructs.
Reduces maintainability and clarity of pipeline definitions.
**Proposed Solution / Feature Request:**
Add support for defining GitLab triggers using the modern pipelineTriggers block.
Example of the desired syntax:
```
properties {
pipelineTriggers {
triggers {
gitlabPush {
buildOnMergeRequestEvents(true)
buildOnPushEvents(true)
enableCiSkip(true)
}
}
}
}
```
**Benefits**:
Eliminates deprecation warnings in Job DSL scripts.
Aligns the GitLab plugin with modern Job DSL best practices.
Improves maintainability and readability of Jenkins pipelines.
**Environment:**
Jenkins version: 2.516.3
GitLab plugin version: 1.9.9
Job DSL plugin version: 1.93
### Upstream changes
_No response_
### Are you interested in contributing this feature?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.