Skip to content
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

Fix payara windows image #2880

Merged
merged 1 commit into from
Apr 28, 2021
Merged
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
9 changes: 8 additions & 1 deletion smoke-tests/matrix/src/main/docker/payara/launch.bat
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
java %JVM_ARGS% -jar glassfish/lib/client/appserver-cli.jar start-domain --verbose domain1
:: server is run through a launcher process, to add jvm arguments we need to add them to configuration file
:: firstly split JVM_ARGS environment variable by space character and put each argument into <jvm-options> tag
:: after that place options into configuration xml after <jvm-options>-server</jvm-options>
SET IN_CONF_FILE=/server/glassfish/domains/domain1/config/domain.xml
SET OUT_CONF_FILE=/server/glassfish/domains/domain1/config/domain.xml
powershell -command "$opts='<jvm-options>' + $env:JVM_ARGS + '</jvm-options>'; $opts=$opts -replace ' ', '</jvm-options><jvm-options>'; (gc $env:IN_CONF_FILE) -replace '<jvm-options>-server</jvm-options>', ('<jvm-options>-server</jvm-options>' + $opts) | sc $env:OUT_CONF_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these JVM_ARGS dynamic? I mean can we already bake them into image itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JVM_ARGS currently contains just the path to our agent which really isn't dynamic, but as we can pass it as an environment variable for all other servers it doesn't make sense to bake this into image for only this server. Also sometimes it is useful to pass additional arguments like -verbose:class for debugging purposes.

:: --verbose starts server in foreground mode where output is printed to console
java -jar glassfish/lib/client/appserver-cli.jar start-domain --verbose domain1