From c96998380c0a42d73dba827a79d4c318591f7afc Mon Sep 17 00:00:00 2001 From: Wolfram Gulde Date: Tue, 5 Jul 2022 09:20:09 +0200 Subject: [PATCH] docs(exx-Pipeline): add licensing tool docs --- .../templates/license/license.gitlab-ci.adoc | 35 +++++++++++++++++++ documentation/document.adoc | 8 +++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 documentation/chapters/templates/license/license.gitlab-ci.adoc diff --git a/documentation/chapters/templates/license/license.gitlab-ci.adoc b/documentation/chapters/templates/license/license.gitlab-ci.adoc new file mode 100644 index 0000000..6a55de4 --- /dev/null +++ b/documentation/chapters/templates/license/license.gitlab-ci.adoc @@ -0,0 +1,35 @@ += license-template + +This template provides a service to collect, validate and publish generated license information for a project. For more details: https://gitlab.exxcellent.de/gilden/ci/exxcellent-license-tools[Gilde CI/CD: exxcellent-license-tool]. + +TIP: The license tool needs a _bom.json_ file which is generated in a previous stage. This is generally done as a part of the build stage (p.ex. by adding cyclonedxBom to the gradle build) and then providing the generated bom.json with artifacts. Again, see https://gitlab.exxcellent.de/gilden/ci/exxcellent-license-tools[Gilde CI/CD: exxcellent-license-tool] for more infos + +The following use cases are possible: + +__Generate Asciidoc for all licenses:__ + +- Set BOM_FILE (source) +- Set LICENSE_ADOC_FILE (target) + +__Validate licenses and generate Asciidoc file:__ + +- Set BOM_FILE (source) +- Set LICENSE_ADOC_FILE (target) +- Set INVALID_LICENSE_ADOC_FILE (target) +- Set ALLOWED_LICENSES + + + + +.Variables +|=== +|Name |Description | Default Value +|BOM_FILE | the path to the bom file (provided in artifacts from previous stage)|bom.json +|ALLOWED_LICENSES | path to the text file with line separated list of allowed licenses |valid-licenses.txt +|LICENSE_ADOC_FILE | path to the generated adoc file with all licenses |licenses.adoc +|INVALID_LICENSE_ADOC_FILE | path to the generated adoc file with invalid licenses |invalid-licenses.adoc +|NUMBER_OF_ALLOWED_FAILURES | number of allowed invalid licenses |0 +|=== + +:template: license/license.gitlab-ci.yml +include::../../../template-printer.adoc[] \ No newline at end of file diff --git a/documentation/document.adoc b/documentation/document.adoc index 1c02560..f609f15 100644 --- a/documentation/document.adoc +++ b/documentation/document.adoc @@ -134,9 +134,13 @@ This collection provides templates to simplify your dokumentation prozess. include::chapters/templates/documentation/documentation.adoc[leveloffset=2] +== Licensing + +This collection provides templates to simplify your licencing prozess. + +include::chapters/templates/license/license.gitlab-ci.adoc[leveloffset=2] + [#_pipelines] === Pipelines include::chapters/pipelines/eXXcellent-release.adoc[leveloffset=3] - -//todo licensing documentieren \ No newline at end of file