-
Notifications
You must be signed in to change notification settings - Fork 60
[WIP] feat: spring boot extension #860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@yanksyoon can you merge in |
|
Related spread failure: |
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.
Looks, great! I have added some minor comments.
The PR also needs rebasing.
This reverts commit 4e92200.
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.
almost there ;)
rockcraft/extensions/springboot.py
Outdated
| ] | ||
| override_build_cmds += [ | ||
| "cp ${CRAFT_STAGE}/*init.gradle* ${CRAFT_PART_BUILD}/.gradle/", | ||
| "rm -f ${CRAFT_STAGE}/*init.gradle*", |
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.
@vpa1977 is right; if the intent is that the gradle-init-script part will provide an init-script that is available during the other part's build but not primed then that part should have its own prime: key (we can document this).
As it is this override-build snippet is wrong: a build script must not remove files from stage/prime.
|
|
||
| build_packages = [*self.DEFAULT_BUILD_PACKAGES] | ||
| if not self.gradlew_path.exists(): | ||
| build_packages += ["gradle"] |
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.
Yes I believe our extensions should default to using archive things. We can discuss how to 'detect' user-provided gradle declarations in the future as an improvement.
Well, there are many related spread failures. This one happened multiple times: |
| Project requirements | ||
| ==================== | ||
|
|
||
| To use the ``spring-boot-framework`` extension, there must be either: |
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.
spring-boot-framework
Except for when we're referring to its name in code, let's please use the plain English name of the extension. :)
| The ``spring-boot-framework`` extension dynamically determines the plugin to be | ||
| used to bulid the rock. Depending on the presence of ``pom.xml`` or |
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 ``spring-boot-framework`` extension dynamically determines the plugin to be | |
| used to bulid the rock. Depending on the presence of ``pom.xml`` or | |
| The ``spring-boot-framework`` extension dynamically determines the plugin to use | |
| use to bulid the rock. Depending on the presence of ``pom.xml`` or |
| or `gradle | ||
| <https://documentation.ubuntu.com/rockcraft/en/latest/common/craft-parts/ | ||
| reference/plugins/gradle_plugin/>`_ | ||
| plugin respectively. |
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.
| plugin respectively. | |
| plugin, respectively. |
| To provide an efficient runtime for Java, the `Jlink | ||
| <https://documentation.ubuntu.com/rockcraft/en/latest/common/craft-parts/ | ||
| reference/plugins/jlink_plugin/>`_ | ||
| plugin is used to trim out any unused parts of the JDK. This reduces the size | ||
| of the rock and improves the performance. |
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.
| To provide an efficient runtime for Java, the `Jlink | |
| <https://documentation.ubuntu.com/rockcraft/en/latest/common/craft-parts/ | |
| reference/plugins/jlink_plugin/>`_ | |
| plugin is used to trim out any unused parts of the JDK. This reduces the size | |
| of the rock and improves the performance. | |
| To provide an efficient runtime for Java, the extension calls the `Jlink | |
| <https://documentation.ubuntu.com/rockcraft/en/latest/common/craft-parts/ | |
| reference/plugins/jlink_plugin/>`_ | |
| plugin to trim out any unused parts of the JDK. This reduces the size | |
| of the rock and improves performance. |
| parts: | ||
| spring-boot-framework/install-app: | ||
| build-packages: | ||
| - openjdk-17-jdk # specify the Java package to use |
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.
| - openjdk-17-jdk # specify the Java package to use | |
| - openjdk-17-jdk # specify the Java package to use |
| - default-jdk | ||
| stage-packages: # these packages are required for bare base rocks. | ||
| - bash_bins | ||
| - ca-certificates_data | ||
| - coreutils_bins | ||
| - base-files_tmp |
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.
| - default-jdk | |
| stage-packages: # these packages are required for bare base rocks. | |
| - bash_bins | |
| - ca-certificates_data | |
| - coreutils_bins | |
| - base-files_tmp | |
| - default-jdk | |
| stage-packages: # these packages are required for bare base rocks. | |
| - bash_bins | |
| - ca-certificates_data | |
| - coreutils_bins | |
| - base-files_tmp |
|
@yanksyoon in addition to the unit test failures, here are the spread errors that I can see: |
|
Still this one left: |
|
@medubelko @yanksyoon I merged with some open comments/suggestions from Michael so we can finally get this feature in; we should do a smaller follow-up PR addressing the open comments. Thanks! |
make lint && make test?Currently blocked by: