Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Expose methods to allow adding parsers through scripting #87

Merged
merged 3 commits into from
Feb 22, 2017
Merged

Expose methods to allow adding parsers through scripting #87

merged 3 commits into from
Feb 22, 2017

Conversation

praqma-thi
Copy link

Related to and building on #82.

It'd be great if we could manipulate the configured parsers through the script console or through Jenkins' start-up scripts. I took the existing commit from #82 and added two methods to add a single or multiple parsers.

Pinging @ewelinawilkosz2 as it relates to her current project.

naramana and others added 2 commits February 22, 2017 13:44
Exposed the replaceGroovyParsers api for external groovy scripts.
This makes it possible to add new parsers through the script console or on Jenkins start-up.
@uhafner
Copy link
Member

uhafner commented Feb 22, 2017

Does this also mean that #82 can be closed afterwards?

@praqma-thi
Copy link
Author

I assume so, as I kept @naramana's method exposed. We're not affiliated, we just have a common interest in making parsers configurable through scripting. :)

/**
* Adds the given Groovy parser to the configured Groovy parsers
*/
public void addGroovyParser(GroovyParser parser) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters should be final

/**
* Adds the given list of Groovy parsers to the configured Groovy parsers
*/
public void addGroovyParsers(List<GroovyParser> parsers) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final Collection<GroovyParser>

/**
* Replaces the configured Groovy parsers with the given list.
*/
public void replaceGroovyParsers(List<GroovyParser> parsers) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final Collection<GroovyParser>

@uhafner uhafner merged commit 8b3b674 into jenkinsci:master Feb 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants