From fffe6d2f7d82a51db1d035e08dc49878f1c398b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20D=2E=20M=C3=BCller?= Date: Sat, 27 Jan 2024 12:26:30 +0000 Subject: [PATCH 1/2] adrs as inlcude --- build-arc-doku.sh | 10 ++++++++++ docToolchainConfig.groovy | 7 ++++--- .../chapters/09_architecture_decisions.adoc | 5 +++-- .../scripts/specialCollectIncludes.gradle | 19 +++++++++++++++++++ 4 files changed, 36 insertions(+), 5 deletions(-) create mode 100755 build-arc-doku.sh create mode 100644 documentation/scripts/specialCollectIncludes.gradle diff --git a/build-arc-doku.sh b/build-arc-doku.sh new file mode 100755 index 0000000..9114781 --- /dev/null +++ b/build-arc-doku.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# convert markdown adrs to asciidoc +./dtcw exportMarkdown + +# create a special include file which references all adrs +./dtcw specialCollectIncludes + +# build the microsite +./dtcw generateSite diff --git a/docToolchainConfig.groovy b/docToolchainConfig.groovy index 6b5647e..e774ddb 100644 --- a/docToolchainConfig.groovy +++ b/docToolchainConfig.groovy @@ -55,6 +55,7 @@ taskInputsFiles = [] // Configuration for customTasks // create a new Task with ./dtcw createTask customTasks = [ + 'documentation/scripts/specialCollectIncludes.gradle', /** customTasks **/ ] @@ -129,7 +130,7 @@ microsite.with { // the menu of the microsite. A map of [code:'title'] entries to specify the order and title of the entries. // the codes are autogenerated from the folder names or :jbake-menu: attribute entries from the .adoc file headers // set a title to '-' in order to remove this menu entry. - menu = [adr: 'Tech Decisions (ADRs)'] + menu = [adrs: '-'] //tag::additionalConverters[] /** @@ -486,9 +487,9 @@ collectIncludes.with { fileFilter = "adoc" // define which files are considered. default: "ad|adoc|asciidoc" - minPrefixLength = "3" // define what minimum length the prefix. default: "3" + minPrefixLength = "0" // define what minimum length the prefix. default: "3" - maxPrefixLength = "3" // define what maximum length the prefix. default: "" + maxPrefixLength = "" // define what maximum length the prefix. default: "" separatorChar = "_" // define the allowed separators after prefix. default: "-_" diff --git a/documentation/arc42/chapters/09_architecture_decisions.adoc b/documentation/arc42/chapters/09_architecture_decisions.adoc index 96d18d2..ec896d8 100644 --- a/documentation/arc42/chapters/09_architecture_decisions.adoc +++ b/documentation/arc42/chapters/09_architecture_decisions.adoc @@ -6,12 +6,13 @@ :filename: /chapters/09_architecture_decisions.adoc ifndef::imagesdir[:imagesdir: ../../images] +:toclevels: 1 :toc: - - [[section-design-decisions]] == Architecture Decisions +ifndef::projectRootDir[:projectRootDir: ../../..] +include::{projectRootDir}/build/adrInclude.adoc[] diff --git a/documentation/scripts/specialCollectIncludes.gradle b/documentation/scripts/specialCollectIncludes.gradle new file mode 100644 index 0000000..77e6552 --- /dev/null +++ b/documentation/scripts/specialCollectIncludes.gradle @@ -0,0 +1,19 @@ +import static groovy.io.FileType.* + +task specialCollectIncludes ( + description: 'collects all ADR files as inlcude', + group: 'docToolchain' +) { + doLast { + println ("collect ADRs\n") + def adrFolder = new File (targetDir, "adrs") + println adrFolder.canonicalPath + def outFile = new File(targetDir,"adrInclude.adoc") + println ("write result to "+outFile.canonicalPath) + outFile.write("//autogenerated through ./dtcw specialCollectIncludes\n\n") + adrFolder.traverse(type: FILES) { file -> + print file.name+"\n" + outFile.append("include::adrs/${file.name}[leveloffset=+1]\n") + } + } +} From adc5424ebb793004ea861ba9f053c051625b72d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20D=2E=20M=C3=BCller?= Date: Sat, 27 Jan 2024 15:06:44 +0000 Subject: [PATCH 2/2] fix markdown --- ...0011-rate-limiter-with-persistently-stored-last-query-time.md | 1 - 1 file changed, 1 deletion(-) diff --git a/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md b/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md index ba48644..47d7be0 100644 --- a/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md +++ b/documentation/adrs/0011-rate-limiter-with-persistently-stored-last-query-time.md @@ -17,7 +17,6 @@ Accepted * This is only valid if our service wasn't shutdown by our cloud provider between calls to our API. If our current server is a "fresh instance", we have to ignore the last-time-called values. -* * As we run in the cloud, we need to store the last-query-time for our external APIs in a persistent store (DB).