Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Again: Jenkins jobs defined using generated DSL must specify all possible configuration for triggers, publishers, etc #674

Closed
jakub-bochenski opened this issue Nov 28, 2017 · 5 comments

Comments

@jakub-bochenski
Copy link
Contributor

Despite #613 it still doesn't seem to work.

I've checked this on a PR build https://ci.jenkins.io/job/Plugins/job/gitlab-plugin/job/PR-664/18/consoleFull
It has the master HEAD integrated: Merging remotes/origin/master commit ab51c7f2f5c585ec20bdcdf8f2d2e301a39a594a into PR head commit 51c3910270c22c1dc3965fdf975d3fa8b49b3564

Still, I'm getting an error when trying to omit any option:

the following options are required and must be specified: triggerOnPush, triggerOnMergeRequest, triggerOnAcceptedMergeRequest, triggerOnClosedMergeRequest, triggerOpenMergeRequestOnPush, triggerOnNoteRequest, noteRegex, skipWorkInProgressMergeRequest, ciSkip, setBuildDescription, addNoteOnMergeRequest, addCiMessage, addVoteOnMergeRequest, acceptMergeRequestOnSuccess, branchFilterType, includeBranchesSpec, excludeBranchesSpec, targetBranchRegex, mergeRequestLabelFilterConfig, secretToken, triggerOnPipelineEvent, triggerOnApprovedMergeRequest
@jakub-bochenski
Copy link
Contributor Author

This is a workaround, which requires only secretToken:

        void gitlabTrigger(Closure overrides) {
            def closure = {
                gitlab {
                    triggerOnPush false
                    triggerOnMergeRequest true
                    triggerOnAcceptedMergeRequest false
                    triggerOnClosedMergeRequest false
                    triggerOpenMergeRequestOnPush  'source'
                    triggerOnNoteRequest true
                    noteRegex 'Jenkins please retry a build'
                    skipWorkInProgressMergeRequest false
                    ciSkip true
                    setBuildDescription true
                    branchFilterType 'All'
                    includeBranchesSpec ''
                    excludeBranchesSpec ''
                    targetBranchRegex ''
                    triggerOnPipelineEvent false
                    triggerOnApprovedMergeRequest false
                    addNoteOnMergeRequest false
                    addCiMessage false
                    addVoteOnMergeRequest false
                    acceptMergeRequestOnSuccess false
                    mergeRequestLabelFilterConfig{
                        include ''
                        exclude ''
                    }
                    with overrides
                }
            }
            closure.delegate = overrides.delegate
            closure()
        }

Usage:

                                triggers {
                                    gitlabTrigger {
                                        secretToken 'effaced'
                                    }
                                }

@omehegan
Copy link
Member

@g-dx since you wrote the original fix for this issue, can you comment on this?

@g-dx
Copy link
Contributor

g-dx commented Jan 18, 2018

We have had v1.5.2 deployed on our Jenkins cluster for at least a month and all is working as expected (i.e. no need to specify all options).

@jakub-bochenski is this still an issue for you?

@jakub-bochenski
Copy link
Contributor Author

I can't reproduce this on 1.5.2

@benkeil
Copy link

benkeil commented Mar 7, 2018

The issue is still present. I need to set the secretToken .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants