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

[JENKINS-65813] Add @Symbol to support pipeline #80

Merged
merged 5 commits into from
Oct 8, 2023
Merged

Conversation

kinow
Copy link
Member

@kinow kinow commented Jul 5, 2023

Supersedes #43

Testing done

Submitter checklist

@kinow
Copy link
Member Author

kinow commented Jul 5, 2023

@mawinter69 I think you had a comment about the HTML help files too. Would you have a suggestion on how these files should look like?

@mawinter69
Copy link

@mawinter69 I think you had a comment about the HTML help files too. Would you have a suggestion on how these files should look like?

Just put a help.html file next to the config.jelly of the parameters.

@kinow
Copy link
Member Author

kinow commented Jul 5, 2023

@mawinter69 I think you had a comment about the HTML help files too. Would you have a suggestion on how these files should look like?

Just put a help.html file next to the config.jelly of the parameters.

I thought you were suggesting improving the existing help files: https://github.com/jenkinsci/active-choices-plugin/tree/master/src/main/webapp

I will have a look to see if they are not being displayed. It worked in the past, but I haven't used it with newer versions.

@mawinter69
Copy link

The help is displayed, but what is missing is a general description of what the parameters are doing.
As an example look at the File Parameter. It has a help button right on top and explains how this parameter works.
image

Such help texts are missing for active choices and the only way to learn how they work is by visiting the plugin page.

@0054
Copy link

0054 commented Oct 3, 2023

Any news?
this will be a very useful feature

@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

Any news? this will be a very useful feature

Hi @0054

Had forgotten about this PR, thanks for the bump 👍 . I'm checking out the master branch, running the tests to confirm it's OK, and will rebase this PR.

If all goes well I hope this can be merged in the next hour to be included in the next release.

@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

Rebased, push-forced. Let's wait for CI.

@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

CI is good. Now trying to add the help files @mawinter69 pointed out we are missing here.

@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

@mawinter69 each parameter now has its own help file displayed next to its type/name.

image

image

I wrote some quick description for each parameter, but @imoutsatsos or someone else can improve it later if needed, so we don't block this PR based on that 👍

Thanks for the feedback!

@kinow kinow changed the title Add @Symbol to support pipeline [JENKINS-65813] Add @Symbol to support pipeline Oct 8, 2023
@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

Righto, last requirement now

Ensure you have provided tests - that demonstrates feature works or fixes the issue

Let's see if I can find a way to test it now. (And maybe write some unit tests for this too. -- this part might take longer, so if someone can step in and help, then we should be able to release it much faster!)

add @symbol to
CascadeChoiceParameter.java
ChoiceParameter.java
DynamicReferenceParameter.java

GroovyScript.java
ScriptlerScript.java

Signed-off-by: bright.ma RMSH06 <[email protected]>
@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

Test for the help files added. It is a Selenium test that was failing, complaining that it would click on an element in the footer instead of on the help icon. Tried using the predefined timeout but that didn't work. Then set the resolution to a wider screen and it solved (I guessed it was using some default smaller resolution, causing the elements to overlap).

Just missing some manual tests with pipelines, and maybe a test for that too.

@kinow
Copy link
Member Author

kinow commented Oct 8, 2023

I don't think it's easy to write a test for this. I had to install the Pipeline plugin.

Screenshot from 2023-10-08 20-39-59

Then use the declarative generator to create a simple parameter.

Screen Shot 2023-10-08 at 20 55 16-fullpage

Pasted into a pipeline job

Screenshot from 2023-10-08 20-56-22

Then build it to produce an updated job, and build with parameters is shown.

Screenshot from 2023-10-08 20-57-28

I will push one more commit with the updated change log, then merge it. To be included with next release (in days/weeks, need to sort out my user+pass to Jenkins repositories).

@kinow kinow merged commit bb4f094 into master Oct 8, 2023
16 checks passed
@kinow kinow deleted the pr20210225 branch October 8, 2023 20:00
@MattLud
Copy link

MattLud commented Oct 17, 2023

Does this PR still need a corresponding test with declarative pipeline? I'd be happy to help add one.

@kinow
Copy link
Member Author

kinow commented Oct 17, 2023

Does this PR still need a corresponding test with declarative pipeline? I'd be happy to help add one.

Hi @MattLud , that'd be great! In this PR I only added one for the help files, so covering the declarative pipeline would be excellent!

Thanks

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.

4 participants