@@ -52,6 +52,7 @@ const (
52
52
dotNetAgentV2Path = "/dotnet/v2/"
53
53
dotNetConfigV2Dir = "%s/ti/v2/dotnet/config"
54
54
javascriptRequireFile = "ti-agent.cjs"
55
+ nativeJavaAgentV2Name = "java-agent-trampoline.jar"
55
56
pythonAgentScript = "harness_ti_plugin"
56
57
)
57
58
617
618
}
618
619
}
619
620
621
+ if javaFFVal , ok := envs ["CI_ENABLE_RUNTESTV2_JAVA_V2_FF" ]; ok && javaFFVal == trueValue {
622
+ javaAgentPathLinux := fmt .Sprintf ("%s%slinux/%s" , tmpFilePath , dotNetAgentV2Path , nativeJavaAgentV2Name )
623
+ javaAgentPathAlpine := fmt .Sprintf ("%s%salpine/%s" , tmpFilePath , dotNetAgentV2Path , nativeJavaAgentV2Name )
624
+
625
+ envs ["JAVA_TOOL_OPTIONS" ] = fmt .Sprintf ("-javaagent:%s" , javaAgentPathLinux )
626
+ envs ["JAVA_TOOL_OPTIONS_ALPINE" ] = fmt .Sprintf ("-javaagent:%s" , javaAgentPathAlpine )
627
+ envs ["JAVA_TOOL_OPTIONS_LINUX" ] = fmt .Sprintf ("-javaagent:%s" , javaAgentPathLinux )
628
+
629
+ if ! isPsh {
630
+ preCmd += "\n if cat /etc/os-release | grep -iq alpine ; then export JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS_ALPINE; fi;"
631
+ } else {
632
+ preCmd += "\n If (Get-Content /etc/os-release | %{$_ -match 'alpine'}) { [System.Environment]::SetEnvironmentVariable('JAVA_TOOL_OPTIONS', [System.Environment]::GetEnvironmentVariable('JAVA_TOOL_OPTIONS_ALPINE')); }"
633
+ }
634
+ }
635
+
620
636
if pythonFFVal , ok := envs ["CI_ENABLE_RUNTESTV2_PYTHON_V2_FF" ]; ok && pythonFFVal == trueValue {
621
637
pythonAgentPathLinux := fmt .Sprintf ("%s%slinux/%s" , tmpFilePath , dotNetAgentV2Path , pythonAgentScript )
622
638
pythonAgentPathAlpine := fmt .Sprintf ("%s%salpine/%s" , tmpFilePath , dotNetAgentV2Path , pythonAgentScript )
0 commit comments