Gitlab plugin and Job DSL

Visto 104 veces
Saltar al primer mensaje no leído

ZT

no leída,
2 dic 2016, 16:31:432/12/16
a job-dsl-plugin


Hello,

I am using the following block but it does not generate the desired XML. 

If i use the following snippet

triggers {
    gitlabPush {
        includeBranches('include')
        buildOnMergeRequestEvents(false)
        buildOnPushEvents(true)
        enableCiSkip(false)
        setBuildDescription(true)
        addNoteOnMergeRequest(false)
        rebuildOpenMergeRequest('never')
        addVoteOnMergeRequest(false)
        useCiFeatures(true)
        acceptMergeRequestOnSuccess(false)
    } 
}    

The XML it generates  is as follows

riggers class="vector">
<com.dabsquared.gitlabjenkins.GitLabPushTrigger>
<spec/>
<triggerOnPush>
true
</triggerOnPush>
<triggerOnMergeRequest>
false
</triggerOnMergeRequest>
<triggerOpenMergeRequestOnPush>
never
</triggerOpenMergeRequestOnPush>
<ciSkip>
false
</ciSkip>
<setBuildDescription>
true
</setBuildDescription>
<addNoteOnMergeRequest>
false
</addNoteOnMergeRequest>
<addCiMessage>
true
</addCiMessage>
<addVoteOnMergeRequest>
false
</addVoteOnMergeRequest>
<includeBranchesSpec>
include
</includeBranchesSpec>
<excludeBranchesSpec/>
<acceptMergeRequestOnSuccess>
false
</acceptMergeRequestOnSuccess>
<allowAllBranches>
false
</allowAllBranches>
</com.dabsquared.gitlabjenkins.GitLabPushTrigger>
</triggers>

You will notice that while the "includeBranchSpec" is indicated, the branchTypeFilter is not set to 'NameBranchFilter' and allowAllBranches is set to 'false', somehow, this causes the UI to show "Allow All Branches" as checked.

Is this a bug in the DSL or the Gitlab Plugin?

Job DSL - 1.53
Gitlab Plugin - 1.4.3

How can i fix this with a configure block?

Regards,
Z

Victor Martinez

no leída,
2 dic 2016, 17:54:192/12/16
a job-dsl-plugin

Daniel Spilker

no leída,
3 dic 2016, 8:55:143/12/16
a job-dsl...@googlegroups.com
I can not reproduce the problem, do not open a issue in JIRA until the problem can be reproduced.

As Victor mentioned, there is a check for the GitLab plugin version to be >= 1.2.0. This check only works when running in Jenkins. The mock implementations always return false for the version check, so only the XML for the older versions is generated when running outside of Jenkins.

Daniel



--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugin+unsubscribe@googlegroups.com.
To post to this group, send email to job-dsl-plugin@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/0a177a23-3f40-43c8-8d6a-9e073eb6f003%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rahul Mishra

no leída,
3 dic 2016, 9:15:443/12/16
a job-dsl...@googlegroups.com
Let me try again within Jenkins  , I did run it outside Jenkins using the mock implementation 
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/CAKqW32C0iM0mBFNOCxchGaM0Wv_1%2B%2BCEubPFwTHDoHZOpc1UYA%40mail.gmail.com.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos