jenkinsci / jenkinsci/ontrack-plugin
Calling ontrack from Jenkins using OntrackDSLStep
- Dominant language
- Java
- Stars
- 9
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Using below snippet we are not able to generate Use the provided DSL script in Jenkins


How can i make usingText to true by using ontrackDSLStep?
Plugin version: ontrack@3.4.1

But if i use below configuration, I am able to see the content as per expected.
configure { node ->
node / builders / 'net.nemerosa.ontrack.jenkins.OntrackDSLStep' {
usingText true
injectEnvironment 'BRANCH'
injectProperties ''
ontrackLog true
sandbox false
ignoreFailure false
scriptText '''println "BRANCH = ${BRANCH}"
def myBranch = "${BRANCH}"
if (myBranch.startsWith('branches/')) {
myBranch = myBranch - 'branches/'
}
myBranch = myBranch.replaceAll('/', '-')
def ontrackBranch = myBranch
if (ontrackBranch.endsWith('x')) {
ontrackBranch = ontrackBranch - 'x'
}
Contributor guide
Research direction
Start at the OntrackDSLStep entry point and compare the shown Jenkins configuration with the plugin's DSL handling for usingText. Reproduce the issue with ontrack@3.4.1 using the provided snippet, then verify that the step can generate and execute the supplied DSL script with usingText enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100