8000 add port config discovery in azure by KaiqianYang · Pull Request #964 · windup/windup-rulesets · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add port config discovery in azure #964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<ruleset id="spring-boot-to-azure-port"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<metadata>
<description>
Identify server port configuration in Spring Boot applications.
</description>
<dependencies>
<addon id="org.jboss.windup.rules,windup-rules-xml,3.0.0.Final"/>
</dependencies>
<sourceTechnology id="springboot"/>
<targetTechnology id="azure-spring-apps"/>
<targetTechnology id="azure-aks"/>
<targetTechnology id="azure-appservice"/>
<targetTechnology id="azure-container-apps"/>
<tag>port</tag>
</metadata>
<rules>
<rule id="spring-boot-to-azure-port-01000">
<when>
<filecontent filename="application{*}.{extensions}" pattern="{pattern}" />
</when>
<perform>
<hint title="Server port configuration found" effort="0" category-id="information">
<message>The application is setting the server port. Please be aware of potential port reliance issues during the migration process</message>
<tag>server port</tag>
</hint>
</perform>
<where param="extensions">
<matches pattern="(properties|yaml|yml)" />
</where>
<where param="pattern">
<matches pattern="(^|\s)server\.port" />
</where>
</rule>
</rules>
</ruleset>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fake.fake = test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fake.fake = test
server.port = 8080
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<ruletest id="spring-boot-to-azure-port-test" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
<testDataPath>data/spring-boot-to-azure-port</testDataPath>
<rulePath>../spring-boot-to-azure-port.windup.xml</rulePath>
<ruleset>
<rules>
<rule id="spring-boot-to-azure-port-test-01000">
<when>
<not>
<iterable-filter size="1">
<hint-exists message="The application is setting the server port." />
</iterable-filter>
</not>
</when>
<perform>
<fail message="spring boot server port hint was not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
0