Hey everyone,
I'm making a simple little plugin that takes in some json and spits it out
again inside of a react component.
My original plan was just to do step(readFile('./report.json')) and take in
the json as a large blob. I wanted to do this so I didn't have to worry
about any logic to determine if the file was safe to read. I've now
realized that won't work with extends Builder implements SimpleBuildStep
since freestyle would have to know the json ahead of time.
So suggestions please.
1) Do I drop freestyle support? Are people still making freestyle plugins?
2) Copy the checks from readJSON that make sure its a valid file -
https://github.com/jenkinsci/pipeline-utility-steps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/utility/steps/json/ReadJSONStepExecution.java#L66-L80
3) Don't have the checks as it seems readFile doesn't have them -
https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/f9f082f4e1069cf69feba3a326d15e01f5ecea21/src/main/java/org/jenkinsci/plugins/workflow/steps/ReadFileStep.java#L111
the problem with 2 and 3 are if any security updates get made, i'll
probably not see them
But its also such a stupidly simple problem, I'm probably over thinking it.
Gavin
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DutnM9dPicBtT%2Bd8gfr8QCd3M5hVsn%2BsR1OuZ9YapcUJ-A%40mail.gmail.com.