Skip to content
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

[BEE-37070] add inline documentation for build strategies #388

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ampuscas
Copy link

@ampuscas ampuscas commented Jul 7, 2023

Add inline documentation for Build Strategies

Testing done

Submitter checklist

@ampuscas ampuscas requested a review from a team as a code owner July 7, 2023 12:31
Comment on lines 46 to 48
<f:entry title="${%Build strategies}" field="buildStrategies">
<f:entry title="${%Strategy}" field="strategyId"></f:entry>
<f:hetero-list name="buildStrategies" items="${instance.buildStrategies}"
Copy link
Member

Choose a reason for hiding this comment

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

The fake f:entry does not look right. You should not need to resort to tricks to have help for a standard form control. I think the problem here is that the original page used unnecessarily low-level controls. Better to use the higher-level f:repeatableHeteroProperty which groks databinding and should allow you to simply create a file with the conventional name, help-buildStrategies.html.

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Sort of works. Gets messed up when you click the help next to an actual strategy like Skip initial build on first branch indexing, which I suspect is due to this facet still using a nonstandard control.

buildStrategies

@@ -43,7 +43,7 @@
</j:if>
<j:set var="descriptors" value="${descriptor.buildStrategiesDescriptors(it,sourceDescriptor)}"/>
<j:if test="${!descriptors.isEmpty()}">
<f:entry title="${%Build strategies}">
<f:entry title="${%Build strategies}" field="buildStrategies">
Copy link
Member

Choose a reason for hiding this comment

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

So, showing

By default (i.e. when empty), everything except tags will be automatically built whenever discovered or changed.
If you add at least one strategy then the defaults will be disabled and only the configured strategies will be
applied.

@jglick
Copy link
Member

jglick commented Jul 10, 2023

Might not be possible to use f:repeatableHeteroProperty currently since it does not support an explicit descriptors attribute and

public List<BranchBuildStrategyDescriptor> buildStrategiesDescriptors(
@NonNull MultiBranchProject project, @NonNull SCMSourceDescriptor sourceDescriptor) {
requires a special calculation.

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.

2 participants