-
Notifications
You must be signed in to change notification settings - Fork 16
Add initial package-config generation #28
Add initial package-config generation #28
Conversation
Just some feedback if I am in the right direction would be great |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments. I think first address the coding hints, and then modify the test a bit to check the generated contents.
@@ -0,0 +1,19 @@ | |||
package com.org.jenkins.Custom.Jenkins.Distribution.Service.Util; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the code quality check says!
...m/org/jenkins/Custom/Jenkins/Distribution/Service/generators/PackageConfigGeneratorTest.java
Outdated
Show resolved
Hide resolved
...a/com/org/jenkins/Custom/Jenkins/Distribution/Service/generators/PackageConfigGenerator.java
Outdated
Show resolved
Hide resolved
I read in one of the blogs that it is not a good idea to test private methods, so IMO we should just write more tests via the public method. |
@kwhetstone This pull request looks good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'v made some comments.
There's one more thing that might not be perfect. The updateCenter.json
file is a little bit big, it will increase the git repository. Importantly updateCenter.json
can be stale after a few days. It always being updated.
pom.xml
Outdated
<artifactId>junit-jupiter-api</artifactId> | ||
<version>5.6.2</version> | ||
<scope>test</scope> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the indent here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already indented.Is there any different way to indent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indent for this dependency
is different than the others. I think your editor might be able to auto-fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I just noticed it shows up fine in my IDE.I will have a look
This PR deals with adding the downloader #31. I guess for running the tests we should just put a short version of the update center |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a compromise for this PR: could you make update_center.json smaller? Just make your own with a list of 3 plugins with a comment that it's a placeholder. I agree that you shouldn't include that file in the repo, especially since it's getting replaced.
On the positive side, looks like the builds are running
pom.xml
Outdated
<artifactId>junit-jupiter-api</artifactId> | ||
<version>5.6.2</version> | ||
<scope>test</scope> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indent for this dependency
is different than the others. I think your editor might be able to auto-fix this.
Looks like it's not iding test files because the test's aren't running: script returned exit code 143 I think that can addressed in a separate PR |
922fb55
to
13b735e
Compare
This pull request adds package-config generation. We would like to pass the form data that we get from the front end in the form of a JSON Object rather than put in tons of arguments therefore the argument that
generatePackageConfig
takes is a JSONObject and from that object we would construct the yaml file.Added tests
Run the build locally