exaplus and AzureDevOps

Xpert

Hi everyone,

 

I´m trying to use Microsoft Azure DevOps to deploy a SQL-script ( agent from AzureDevOps runs exaplus with the necessary cmd-line arguments and the script file ) but even though there is no problem at all and the script finished as intended the AzureDevOps error handling picks up on some kind of extra  return value.

This seems to be a common phenomenon when using java executables on an AzureDevOps server where _JAVA_OPTIONS is set on the server.

Here´s an output to this:

20T12:24:12.7798870Z ==============================================================================
2020-07-20T12:24:12.7799337Z Task         : Command line
2020-07-20T12:24:12.7799696Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2020-07-20T12:24:12.7799924Z Version      : 2.164.2
2020-07-20T12:24:12.7800218Z Author       : Microsoft Corporation
2020-07-20T12:24:12.7800573Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2020-07-20T12:24:12.7800853Z ==============================================================================
2020-07-20T12:24:13.3866800Z Generating script.
2020-07-20T12:24:13.3917866Z Script contents:
2020-07-20T12:24:13.3922024Z "C:\Program Files (x86)\Exasol\EXASolution-6.2\EXAplus\exaplusx64.exe" -c valid-connectstring:8563 -profile xyz -f "D:\a2\r1350\a/project/EXA/select_table.sql"
2020-07-20T12:24:13.4164292Z ========================== Starting Command Output ===========================
2020-07-20T12:24:13.4350572Z ##[command]"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a2_temp\4a5dd1c3-5eb6-4a82-af1c-65431273603f.cmd""
2020-07-20T12:24:13.8827463Z EXAplus 6.2.5 (c) EXASOL AG
2020-07-20T12:24:13.8830173Z 
2020-07-20T12:24:14.0400496Z Monday, July 20, 2020 2:24:14 PM CEST
2020-07-20T12:24:14.0405271Z Connected to database .... as user ....
2020-07-20T12:24:14.0409794Z EXASolution 6.0.14 (c) EXASOL AG
2020-07-20T12:24:14.0412245Z 
2020-07-20T12:24:14.0655321Z EXA: SELECT * FROM pipelinetest;
2020-07-20T12:24:14.1510282Z 
2020-07-20T12:24:14.1515173Z TAB1         
2020-07-20T12:24:14.1520156Z -------------
2020-07-20T12:24:14.1524703Z            56
2020-07-20T12:24:14.1530325Z             7
2020-07-20T12:24:14.1534680Z            71
2020-07-20T12:24:14.1538418Z 
2020-07-20T12:24:14.1542869Z 3 rows in resultset.
2020-07-20T12:24:14.1545241Z 
2020-07-20T12:24:14.1620014Z 
2020-07-20T12:24:14.1625216Z Disconnected.
2020-07-20T12:24:14.2623796Z ##[error]Picked up _JAVA_OPTIONS: -Dhttp.proxyHost=.....
2020-07-20T12:24:14.2913795Z ##[section]Finishing:

Apart from redirecting stderr into a file and building my own error handling ( which I´m reluctant to do.... ) and not setting the _JAVA_OPTIONS ( which may perhaps avoid this problem (not tested) but isn´t really a viable option because it´s a needed param in the environment ).....does someone know a solution to this ?


Cheers,
Malte

1 ACCEPTED SOLUTION

Xpert

Did you try to explicitly set the _JAVA_OPTIONS as a variable in the yaml file to empty string, so that is just empty for this run?

AFAIK all pipeline variables are being set as environment variables for this run and should replace system enviroment variables for the execution.

 

View solution in original post

3 REPLIES 3

Xpert

Did you try to explicitly set the _JAVA_OPTIONS as a variable in the yaml file to empty string, so that is just empty for this run?

AFAIK all pipeline variables are being set as environment variables for this run and should replace system enviroment variables for the execution.

 

View solution in original post

Xpert

Since my AzureDevOps-foo isn´t really that great I simply put the "unset" right before the exaplus call in the "Script"-tab ( probably it can be set more smoothly in the EnvVar-tab but I didn´t figure out how to pass a blank var value) :

set _JAVA_OPTIONS=

"C:\Program Files (x86)\Exasol\EXASolution-6.2\EXAplus\exaplusx64.exe" -c ......

This does indeed stop the error from being thrown at the end of the deploy ! Thanks again !!!

Xpert

Worth a shot, I´ll try ! Thanks Charlie !