Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 18/Mar/15 7:40 PM
Description:

When iterating over a collection with .each, the permission method seems to call the deprecated job permission method with logs a warning (Warning: permission is deprecated)

Unable to find source-code formatter for language: groovy. Available languages are: _javascript_, sql, xhtml, actionscript, none, html, xml, java
def builderNames = ['john', 'jill', 'bob']
freeStyleJob('jobName') {
    // ....
    authorization {
        builderNames.each {
            permission(Permissions.ItemBuild, it)
        }
    }
    // ....
}

However, something like this works and does not log the warning:

Unable to find source-code formatter for language: groovy. Available languages are: _javascript_, sql, xhtml, actionscript, none, html, xml, java
def builderNames = ['john', 'jill', 'bob']
freeStyleJob('jobName') {
    // ....
    authorization {
        for (builderName in builderNames) {
            permission(Permissions.ItemBuild, builderName)
        }
    }
    // ....
}

This seems to be related to https://issues.jenkins-ci.org/browse/JENKINS-27321 but I've updated the description of this issue to specify that it only seems to be happening in .each (though I haven't tried other methods that take Closures as arguments)

Project: Jenkins
Priority: Minor Minor
Reporter: Nicholas Russell
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to