I have a problem in my gitlab-ci.yml
on Windows. I launch phpunit
with environments variables.
So, I have a variable like:
PHPUNIT : %SOURCE_PATH%\cgi-bin\php.exe %PHPUNIT_PATH%
And some variables are declared before:
SOURCE_PATH: 'C:\Source'
PHPUNIT_PATH: '"%SOURCE_PATH%\cgi-bin\tests\__init\tools\phpunit.phar"'
But when I use the CALL command, Windows doesn't resolve the variable inside the other variable.
So if I do:
CALL Echo %PHPUNIT%
I have:
C:\Source\cgi-bin\php.exe "%SOURCE_PATH%\cgi-bin\tests\__init\tools\phpunit.phar"
I think this is because of %SOURCE_PATH%
doesn't exist in CALL context.
But I could not find out how to pass the environment variables in the CALL. And I could not find another way to do this, too. (If I don't use CALL, the gitlab-ci stops when the inside script exits.)
I wish you can help me ...
Somethings to know.
My script is launched by gitlab-ci runner, so it is started by:
setlocal enableextensions
setlocal enableDelayedExpansion
set nl=^
And I can't change this.
I can use PowerShell if needed, or if you know another work around. :)