-
Notifications
You must be signed in to change notification settings - Fork 73
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
CLI Support and changes to make PowerDocu more friendly for usage with DevOps #111
Conversation
Introduce support for all variables in the front-end and add in console validation.
@@ -3,7 +3,7 @@ | |||
|
|||
namespace PowerDocu.SolutionDocumenter | |||
{ | |||
class SolutionDocumentationContent | |||
public class SolutionDocumentationContent |
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.
This access modifier was causing me build issues
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.
Hi Aidan, many thanks for this! Wanted to look into this at some point "soon" as well, this helps a lot. Will review it in detail in the upcoming days |
Hi Rene, my pleasure. Thank you for creating this awesome tool! There's a consideration that might be worth exploring which is why I haven't marked this PR as Ready for review. The CLI support can be added to the GUI app by taking advantage of Main and args variable Main() and command-line arguments |
…te documentation to specific folders
…nd introducing a .order file at the route of the documentation. This allows documentation to be source controlled and viewable in DevOps wiki
Add support for devops wiki by changing the folder structure format …
Just some updates on this PR as well as on Azure DevOps I made some additional changes to the CLI project, introduced an output variable and made some changes to the solution output so that it can be used in DevOps wiki's. The naming conventions didn't work with DevOps wiki, even with a .order file. There also needed to be the generation of a .order file to allow DevOps wiki's to understand the multiple levels in solution documentation. I've also successfully created an Azure DevOps custom task PowerDocu-DevOps that downloads a the release of PowerDocu to the agent from GitHub and accepts all of the CLI arguments as part of the PR and executes PowerDocu. It's currently a private project being executed in our own Pipelines but is so far successful. I'm happy to share access to the task on Marketplace. How it looks in DevOps: Our pipelines source control our solutions, but by setting the output folder we're able to separate out the solution from the documentation Then by using Azure DevOps 'Publish code as wiki' we're able to create a wiki page from the repository |
@@ -24,7 +24,7 @@ class AppDocumentationContent | |||
public AppDocumentationContent(AppEntity app, string path) | |||
{ | |||
NotificationHelper.SendNotification("Preparing documentation content for " + app.Name); | |||
folderPath = path + CharsetHelper.GetSafeName(@"\AppDoc - " + app.Name + @"\"); | |||
folderPath = path + CharsetHelper.GetSafeName(@"\AppDoc " + app.Name + @"\"); |
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 '-' is read in DevOps Wiki's as a space, which got the wiki structure very confused so this had to be removed
@@ -10,21 +10,22 @@ namespace PowerDocu.AppDocumenter | |||
{ | |||
public static class AppDocumentationGenerator | |||
{ | |||
public static List<AppEntity> GenerateDocumentation(string filePath, string fileFormat, bool documentDefaultChangesOnly, bool documentDefaults, string wordTemplate = null) | |||
public static List<AppEntity> GenerateDocumentation(string filePath, string fileFormat, bool documentDefaultChangesOnly, bool documentDefaults, string wordTemplate = null, string outputPath = null) |
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.
Add support for a different path to save the documentation to so that in a DevOps pipeline the documentation can be created in a specific folder on an agent and then commited to the repository.
It becomes hard to extract the documentation out when it's being saved in the folder that the solution is so this is a quality of life feature
@@ -19,7 +19,7 @@ class FlowDocumentationContent | |||
public FlowDocumentationContent(FlowEntity flow, string path, FlowActionSortOrder sortOrder = FlowActionSortOrder.SortByName) | |||
{ | |||
NotificationHelper.SendNotification("Preparing documentation content for " + flow.Name); | |||
folderPath = path + CharsetHelper.GetSafeName(@"\FlowDoc - " + flow.Name + @"\"); | |||
folderPath = path + CharsetHelper.GetSafeName(@"\FlowDoc " + flow.Name + @"\"); |
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 '-' is read in DevOps Wiki's as a space, which got the wiki structure very confused so this had to be removed
@@ -7,21 +7,22 @@ namespace PowerDocu.FlowDocumenter | |||
{ | |||
public static class FlowDocumentationGenerator | |||
{ | |||
public static List<FlowEntity> GenerateDocumentation(string filePath, string fileFormat, string flowActionSortOrder, string wordTemplate = null) | |||
public static List<FlowEntity> GenerateDocumentation(string filePath, string fileFormat, string flowActionSortOrder, string wordTemplate = null, string outputPath = null) |
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.
Add support for a different path to save the documentation to so that in a DevOps pipeline the documentation can be created in a specific folder on an agent and then commited to the repository.
It becomes hard to extract the documentation out when it's being saved in the folder that the solution is so this is a quality of life feature
@@ -9,7 +9,7 @@ namespace PowerDocu.SolutionDocumenter | |||
{ | |||
public static class SolutionDocumentationGenerator | |||
{ | |||
public static void GenerateDocumentation(string filePath, string fileFormat, bool documentDefaultChangesOnly, bool documentDefaults, string flowActionSortOrder, string wordTemplate = null) | |||
public static void GenerateDocumentation(string filePath, string fileFormat, bool documentDefaultChangesOnly, bool documentDefaults, string flowActionSortOrder, string wordTemplate = null, string outputPath = null) |
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.
Add support for a different path to save the documentation to so that in a DevOps pipeline the documentation can be created in a specific folder on an agent and then commited to the repository.
It becomes hard to extract the documentation out when it's being saved in the folder that the solution is so this is a quality of life feature
@@ -322,5 +322,19 @@ private MdImageSpan getAccessLevelIcon(string accessLevel) | |||
}; | |||
return getAccessLevelIcon(level); | |||
} | |||
|
|||
private void createOrderFile() |
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.
This order file is needed to allow DevOps wiki to understand the folder structure of a solution's documentation
…rect stdout correctly.
Hi guys, |
Hi @a1dancole , finally came back to PowerDocu and continued working on it. Your PRs have all been requested, and I'm about to release a new version overall in the next few days. |
Change Documenter projects to be Library types instead of Console to avoid confusion in how to interact with the projects following this change.
Add a new Console application PowerDocu.CLI to define the entry point for use in the command line. This change also includes support for all available variables that are possible in the GUI with validation.
I see this proposed change as the start of making PowerDocu available in DevOps by providing a clearly defined, documented CLI interface. I will be using these proposed changes to start working on making PowerDocu available in Azure DevOps as I want to integrate it with existing pipelines that I currently use