From 22f544cc406c43c6641ccdc4c32fa84a16ad7f30 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Fri, 4 Aug 2023 14:48:43 +0000 Subject: [PATCH] admonitions Signed-off-by: GitHub --- roles/generate-jenkins/templates/DOCUMENTATION.j2 | 6 ++++-- roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM | 1 + roles/generate-jenkins/templates/README.j2 | 1 + roles/generate-jenkins/templates/README.j2-CUSTOM | 1 + .../templates/README_SNIPPETS/DEPRECATION.j2 | 4 ++-- .../templates/README_SNIPPETS/UPDATING_INFO.j2 | 4 ++-- roles/generate-jenkins/templates/lite.j2 | 1 + roles/generate-jenkins/templates/lite.j2-CUSTOM | 1 + 8 files changed, 13 insertions(+), 6 deletions(-) diff --git a/roles/generate-jenkins/templates/DOCUMENTATION.j2 b/roles/generate-jenkins/templates/DOCUMENTATION.j2 index 368ac4eb..a96aff37 100644 --- a/roles/generate-jenkins/templates/DOCUMENTATION.j2 +++ b/roles/generate-jenkins/templates/DOCUMENTATION.j2 @@ -1,4 +1,5 @@ #jinja2: keep_trailing_newline:True +{%- set output_type="DOCUMENTATION" -%} {%- set has_latest= true if (development_versions == true and 'latest' in (development_versions_items | map(attribute="tag"))) or (development_versions == false) else false -%} --- title: {{ project_name }} @@ -169,8 +170,9 @@ Containers are configured using parameters passed at runtime (such as those abov ### Portainer notice -!!!warning -This image utilises `cap_add` or `sysctl` to work properly. This is not implemented properly in some versions of Portainer, thus this image may not work if deployed through Portainer. +!!! warning + + This image utilises `cap_add` or `sysctl` to work properly. This is not implemented properly in some versions of Portainer, thus this image may not work if deployed through Portainer. {% endif %} {% include "README_SNIPPETS/ENV_VAR_FILES.j2" | trim %} diff --git a/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM b/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM index b6bf1ae2..4190469a 100644 --- a/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM +++ b/roles/generate-jenkins/templates/DOCUMENTATION.j2-CUSTOM @@ -1,3 +1,4 @@ +{%- set output_type="DOCUMENTATION" -%} --- title: {{ project_name }} --- diff --git a/roles/generate-jenkins/templates/README.j2 b/roles/generate-jenkins/templates/README.j2 index 6b62fc9f..fd4d15c5 100644 --- a/roles/generate-jenkins/templates/README.j2 +++ b/roles/generate-jenkins/templates/README.j2 @@ -1,4 +1,5 @@ #jinja2: keep_trailing_newline:True +{%- set output_type="README" -%} {%- set has_latest= true if (development_versions == true and 'latest' in (development_versions_items | map(attribute="tag"))) or (development_versions == false) else false -%} {% include "README_SNIPPETS/DO_NOT_EDIT.j2" | trim %} {% include "README_SNIPPETS/GROUP_INFO.j2" | trim %} diff --git a/roles/generate-jenkins/templates/README.j2-CUSTOM b/roles/generate-jenkins/templates/README.j2-CUSTOM index 6650893f..8e81ff2b 100644 --- a/roles/generate-jenkins/templates/README.j2-CUSTOM +++ b/roles/generate-jenkins/templates/README.j2-CUSTOM @@ -1,3 +1,4 @@ +{%- set output_type="README" -%} {% include "README_SNIPPETS/DO_NOT_EDIT.j2" | trim %} {% if project_deprecation_status %} {% include "README_SNIPPETS/DEPRECATION.j2" | trim %} diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 b/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 index bc83dbc4..c25244a3 100644 --- a/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 +++ b/roles/generate-jenkins/templates/README_SNIPPETS/DEPRECATION.j2 @@ -1,4 +1,4 @@ -# DEPRECATION NOTICE +{{ '!!! danger "' if output_type == "DOCUMENTATION" else '# ' }}DEPRECATION NOTICE{{ '"' if output_type == "DOCUMENTATION" }} -This image is deprecated. We will not offer support for this image and it will not be updated. +{{ ' ' if output_type == "DOCUMENTATION" }}This image is deprecated. We will not offer support for this image and it will not be updated. {% if project_deprecation_message is defined %}{{ project_deprecation_message }}{% endif %} diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 b/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 index 5a2e1455..852515ae 100644 --- a/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 +++ b/roles/generate-jenkins/templates/README_SNIPPETS/UPDATING_INFO.j2 @@ -62,8 +62,8 @@ Below are the instructions for updating containers: * You can also remove the old dangling images: `docker image prune` -**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose]({{ lsio_docs_url }}/general/docker-compose). +{{ '!!! warning\n\n ' if output_type == "DOCUMENTATION" else '**Warning:** ' }}We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose]({{ lsio_docs_url }}/general/docker-compose). ### Image Update Notifications - Diun (Docker Image Update Notifier) -* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. +{{ '!!! tip\n\n ' if output_type == "DOCUMENTATION" else '* ' }}We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. diff --git a/roles/generate-jenkins/templates/lite.j2 b/roles/generate-jenkins/templates/lite.j2 index d0d3cb8f..12881da1 100644 --- a/roles/generate-jenkins/templates/lite.j2 +++ b/roles/generate-jenkins/templates/lite.j2 @@ -1,3 +1,4 @@ +{%- set output_type="lite" -%} {% if project_deprecation_status %} {% include "README_SNIPPETS/DEPRECATION.j2" | trim %} diff --git a/roles/generate-jenkins/templates/lite.j2-CUSTOM b/roles/generate-jenkins/templates/lite.j2-CUSTOM index f9d38d6b..c9293db1 100644 --- a/roles/generate-jenkins/templates/lite.j2-CUSTOM +++ b/roles/generate-jenkins/templates/lite.j2-CUSTOM @@ -1,3 +1,4 @@ +{%- set output_type="lite" -%} {% if project_deprecation_status %} {% include "README_SNIPPETS/DEPRECATION.j2" | trim %}