Skip to content

Job Dsl Whitelisting Option - #968

Open
smoyen wants to merge 37 commits into
jenkinsci:masterfrom
smoyen:master
Open

Job Dsl Whitelisting Option#968
smoyen wants to merge 37 commits into
jenkinsci:masterfrom
smoyen:master

Conversation

@smoyen

@smoyen smoyen commented Dec 14, 2016

Copy link
Copy Markdown

Whitelisting allows administers to only allow a subset of "approved" job dsl to be processed to create new jobs. We will use in our environment by allowing them to define the job dsl file in source control, and by adding these whitelisting options to all seed jobs to ensure they are using only "approved" dsl. In our environment, developers will not have access to the seed job itself, so we can set the whitelist, and all they need to do is check in their job-dsl.groovy code to their branch.
See the help pages for the added text boxes for more detailed info.
Thanks!

g537597@genmills added 3 commits December 7, 2016 19:07
Added UI for job whitelist. Added handling for Step, Publisher, Wrapper, SCM and Trigger contexts, as well as externally defined raw Configure blocks. Externally defined blocks for the contexts above are also supported.
Still need to add info file for whitelist feature and add tests,
Fixed test failure. Added help file (not complete yet)
Two things I think I still have to consider. 1) This should probably go in the wiki section since it's so verbose. 2) Should I move out of the Advanced section.
@smoyen

smoyen commented Dec 14, 2016

Copy link
Copy Markdown
Author

How do I look at the code narc results that Jenkins references, here - Execution failed for task ':job-dsl-core:codenarcMain'.

CodeNarc rule violations were found. See the report at: file:///scratch/jenkins/workspace/plugins/job-dsl-plugin/job-dsl-core/build/reports/codenarc/main.html - to find out what I need to fix?

@smoyen

smoyen commented Dec 14, 2016

Copy link
Copy Markdown
Author

Nevermind. I ran on my local, and can see the codeNarc report. I will fix the issues, and add the changes to this pull request.

@smoyen

smoyen commented Jan 10, 2017

Copy link
Copy Markdown
Author

This feature is now considered complete in my book, so I would love to hear feedback on whether or not it can get it merged into the master branch.
Let me know if there's anything more you need me to do.

@daspilker

Copy link
Copy Markdown
Member

Hi @smoyen! Thanks for working on this. I like the XML based approach for validating generated config, but this is a huge PR and I'm not sure how many people would find this useful. I would like keep this PR open for a while to gather some feedback. Can you create a corresponding issue in JIRA to increase visibility?

@jgangemi

Copy link
Copy Markdown

may i suggest squashing these commits? also not sure if this PR could be split into smaller pieces, but it would make it easier to consume.

@smoyen

smoyen commented Jan 16, 2017

Copy link
Copy Markdown
Author

Thanks for getting back to me @daspilker. The Jira ticket is created so we can see what we hear. I know that a decent amount of companies (that I talked to at the Jenkins conference last year) who have a centralized build and deploy team, and are trying to move pockets of dev ops back into a centralized build and deploy pipeline have expressed similar interests due to still wanting to maintain the same level of security and control when moving from a customized build/deploy system to Jenkins. Also, I can move the whitelisting options into the advanced section as to not clutter up the plugin for a feature that is not used all that often (let me know if you think that's a good idea).
That being said all of the code that was introduced is opt in, so if jobs don't use this feature, there should be absolutely no change to the current functionality or performance.
Thanks for considering this pull request!

@samrocketman

Copy link
Copy Markdown
Member

ref: https://api.github.com/repos/jenkinsci/job-dsl-plugin/commits/280eb26fd9508850b9863253dc5ee9361d58afef

@smoyen
Any particular reason why your commit name is g537597@genmills? Also, you don't appear to have associated your commit email with your GitHub account.

g537597@genmills added 6 commits February 1, 2017 13:16
Support for custom config blocks whitlisting for steps, triggers, publishers,  and wrappers. Additional tests and updated help blocks. Also moved the whitelisting feature from the main plugin widget section to the Advanced section.
@daspilker

Copy link
Copy Markdown
Member

@smoyen sorry for answering so late

Are you interested in picking this up again?

@jiff-infrastructure

Copy link
Copy Markdown

Can one of the admins verify this patch?

@CorevistCI

Copy link
Copy Markdown

Build finished.

@podarok

podarok commented Oct 3, 2022

Copy link
Copy Markdown

Would be great to have this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants