Commit c9d8a43b authored by Jérome Perrin's avatar Jérome Perrin

software/plantuml: version up 1.2022.7

The default "skin" changed, which results in diagram being grey instead
of looking like rational rose. The previous behavior can be kept by
using instruction `skin rose` in diagram code (see the changes in tests
for example)
parent 2491c253
Pipeline #23251 failed with stage
in 0 seconds
......@@ -15,8 +15,8 @@
[instance]
filename = instance.cfg.in
md5sum = 51597d8161458028ea8b46962d378a70
md5sum = d769f82481c689ec2c66fc1de0f0541a
[tomcat-server-xml]
filename = server.xml.in
md5sum = fdfa7eb249082855039ca98f310324e9
md5sum = 367f91cf7d3a053a94edc9e675a12e25
......@@ -37,29 +37,30 @@ scheme = https
[tomcat-web-xml]
recipe = plone.recipe.command
command = [ -f $${:location} ] || cp ${tomcat9:location}/conf/web.xml $${:location}
command = [ -f $${:location} ] || cp ${tomcat:location}/conf/web.xml $${:location}
location = $${directory:catalina_conf}/web.xml
[tomcat-keystore]
recipe = plone.recipe.command
command =
${java-re-8-output:keytool} \
${java:location}/bin/keytool \
-genkeypair \
-alias "tomcat" \
-keyalg RSA \
-keypass "$${:pass}" \
-dname "CN=Web Server,OU=Unit,O=Organization,L=City,S=State,C=Country" \
-dname "CN=$${:common-name},OU=Unit,O=Organization,L=City,S=State,C=Country" \
-keystore "$${:file}" \
-storepass "$${:pass}"
file = $${directory:catalina_base}/.keystore
pass = insecure
common-name = $${tomcat-server-xml:ip}
[tomcat-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = ${tomcat9:location}/bin/catalina.sh run
command-line = ${tomcat:location}/bin/catalina.sh run
environment =
JRE_HOME=${java-re-8:location}
JRE_HOME=${java:location}
CATALINA_BASE=$${directory:catalina_base}
GRAPHVIZ_DOT=${graphviz:location}/bin/dot
FONTCONFIG_FILE=$${fontconfig-conf:output}
......
<?xml version='1.0' encoding='utf-8'?>
<Server port="-1" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<Service name="Catalina">
<Connector
protocol="org.apache.coyote.http11.Http11Nio2Protocol"
......@@ -11,10 +17,16 @@
secure="true"
clientAuth="false"
SSLEnabled="true"
keystorePass="$${tomcat-keystore:pass}"
keystoreFile="$${tomcat-keystore:file}"
>
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate
certificateKeystoreFile="$${tomcat-keystore:file}"
certificateKeystorePassword="$${tomcat-keystore:pass}"
type="RSA"
/>
</SSLHostConfig>
</Connector>
<Engine name="Catalina" defaultHost="localhost">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".log"
......
......@@ -15,6 +15,12 @@ parts =
slapos-cookbook
instance
[tomcat]
<= tomcat10
[java]
<= java-re-temurin-11
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
......@@ -27,5 +33,5 @@ output = ${buildout:directory}/${:_buildout_section_name_}
[plantuml.war]
recipe = slapos.recipe.build:download
url = https://sourceforge.net/projects/plantuml/files/1.2020.15/plantuml.1.2020.15.war
md5sum = ed203cb3b90df8f77492fa36ea6490a5
url = https://github.com/plantuml/plantuml-server/releases/download/v1.2022.7/plantuml-jsp-v1.2022.7.war
md5sum = d0889f990f4db01efebb9b9fe98ebf7b
......@@ -64,10 +64,23 @@ class TestSimpleDiagram(PlantUMLTestCase, ImageComparisonTestCase):
# http://www.plantuml.com/plantuml/png/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vuBmWC8WMIi5ztm5n_B4IYw7rBmKe1u0
# because plantuml include information about the server in the output image metadata ( you can
# use http://exif.regex.info/exif.cgi to see metadata )
# So we process the image to remove metadata.
# We just compare that image are similar.
reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_sequence_diagram.png"))
self.assertImagesSame(Image.open(BytesIO(png)), reference)
def test_sequence_diagram_skin_rose(self):
# default theme changed, but we can use `skin rose` to keep old theme
# https://github.com/plantuml/plantuml/issues/996
png = self.plantuml.processes(textwrap.dedent("""\
@startuml
skin rose
Bob -> Alice : hello
Alice -> Bob : Go Away
@enduml
"""))
reference = Image.open(os.path.join(os.path.dirname(__file__), "data", "test_sequence_diagram_skin_rose.png"))
self.assertImagesSame(Image.open(BytesIO(png)), reference)
def test_class_diagram(self):
"""Class diagram require a working graphviz installation"""
png = self.plantuml.processes(textwrap.dedent("""\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment