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

[INFRA-1053] Generate Declarative directive docs. #12

Merged
merged 5 commits into from
Jan 23, 2018

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Nov 16, 2017

INFRA-1053

This is the first work in that direction - it may make sense to keep
everything in here after all rather than splitting things up as in #11

This generates (at least in theory) Asciidoc for the Declarative
directives that contain Describables - i.e., agent, when,
options, triggers, and parameters. More work is needed to
special-case post due to its conditions not being
Describables. Grr. I have regrets there.

Also, this depends on jenkinsci/pipeline-model-definition-plugin#219 to actually have help info for the Declarative-specific extension points.

This is the first work in that direction - it may make sense to keep
everything in here after all rather than splitting things up as in

This generates (at least in theory) Asciidoc for the Declarative
directives that contain Describables - i.e., `agent`, `when`,
`options`, `triggers`, and `parameters`. More work is needed to
special-case `post` due to its conditions not being
Describables. Grr. I have regrets there.
@abayer
Copy link
Contributor Author

abayer commented Nov 16, 2017

Ok, I think the latest commit is doing what we want. I did a local run against that Declarative PR's artifacts to get when and agent example adoc files too - you can find them at https://gist.github.com/abayer/3236f980090fdeb9181d76afff2e1fb4

@@ -206,4 +224,106 @@ public void generateAscii(Map<String, Map<String, List<StepDescriptor>>> allStep
}
}
}

public void generateDeclarativeAscii() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Think this could be pulled out of this class? I hoped that PipelineStepExtractor would act more as a hub that goes about calling other classes to do the heavy lifting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough. =)

@kwhetstone
Copy link
Contributor

The printout looks nice. It'd be nice to point to the docs and I see you've got another PR to add the help steps; that'll be nice going in.

@@ -66,7 +66,7 @@
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.651</version>
<version>2.7.1</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

The biggest change... 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regrettably needed to get the Declarative dependency.

@abayer
Copy link
Contributor Author

abayer commented Nov 21, 2017

@kwhetstone And yeah, now I need to figure out how to integrate the docs into jenkins.io. Fun!

@kwhetstone
Copy link
Contributor

Check fetch-external-resources -> that should pull in the pipeline steps to the website.

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