🔧 Enhanced Diagram Support: Fix Structurizr CLI Integration (#1480)#2
Open
raifdmueller wants to merge 5 commits intongfrom
Open
🔧 Enhanced Diagram Support: Fix Structurizr CLI Integration (#1480)#2raifdmueller wants to merge 5 commits intongfrom
raifdmueller wants to merge 5 commits intongfrom
Conversation
This script provides enhanced support for asciidoctor-diagram integration, specifically addressing issue docToolchain#1480 where Structurizr CLI is not properly accessible when running through docToolchain. Key improvements: - Environment variable propagation to AsciidoctorJ subprocess - Enhanced debugging capabilities for diagram setup - Proper forkOptions configuration for external CLI tools - Custom preprocessor for diagram tool path configuration Fixes docToolchain#1480
Shows how to configure enhanced diagram support for Structurizr CLI integration. Includes examples and debugging instructions. Related to docToolchain#1480
This document provides comprehensive testing and troubleshooting guidance for the enhanced Structurizr CLI integration. Includes practical examples and debugging instructions. Addresses docToolchain#1480
Provides complete documentation for the new diagram integration features, including setup instructions, troubleshooting guide, and migration information. Addresses docToolchain#1480
Provides complete overview of the Structurizr CLI integration enhancement including problem description, solution details, setup instructions, and troubleshooting guide. Fixes docToolchain#1480
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Problem Solved
This PR addresses GitHub Issue docToolchain#1480: "AsciiDoc Diagrams can't leverage Structurizr CLI"
When using asciidoctor-diagram with external CLI tools like Structurizr CLI through docToolchain, the diagram tools were not accessible due to environment variable isolation and process execution context issues.
🔧 Solution Overview
This enhancement provides comprehensive support for external diagram CLI tools by:
📁 Files Added
scripts/DiagramSupport.gradle- Main enhancement script with AsciidoctorJ configurationtemplate_config/DiagramConfig.groovy- Configuration template and examplessrc/docs/015_tasks/03_task_enhanced_diagrams.adoc- Comprehensive documentationsrc/docs/015_tasks/03_task_structurizr_test.adoc- Test document with working examplesDIAGRAM_ENHANCEMENT.md- Complete README with setup and troubleshooting🚀 New Features
Tasks
Environment Variables Supported
DIAGRAMS_STRUCTURIZRCLI_HOME- Structurizr CLI pathPLANTUML_JAR- PlantUML JAR pathGRAPHVIZ_DOT- Graphviz DOT executable pathDebug Output Example
📋 Usage Example
Docker Setup
ENV DIAGRAMS_STRUCTURIZRCLI_HOME=/opt/structurizr-cliAsciiDoc Usage
✅ Testing Instructions
Environment Check:
Test with Example Document:
Verify Structurizr CLI Integration:
DIAGRAMS_STRUCTURIZRCLI_HOMEenvironment variablesrc/docs/015_tasks/03_task_structurizr_test.adoc🔄 Backward Compatibility
🐛 Fixes
🔍 Review Notes
The main enhancement is in
scripts/DiagramSupport.gradlewhich:forkOptionsto propagate environment variablesThis approach is non-intrusive and can be easily included in existing projects without modifying core docToolchain files.
📖 Documentation
Complete documentation is provided in:
DIAGRAM_ENHANCEMENT.md- Overview and quick startsrc/docs/015_tasks/03_task_enhanced_diagrams.adoc- Detailed usage guidesrc/docs/015_tasks/03_task_structurizr_test.adoc- Working examples and troubleshootingReady for Review ✨
This enhancement makes docToolchain much more powerful for architecture documentation by enabling seamless integration with external diagram tools like Structurizr CLI.