(ci): update shell scripts in windows jobs
Summary
- Since Gitlab runner 13.0,
Windows Batch
has been removed (by default) in the Windows shell executor
- We can still temporarily use
cmd
by specifying shell = "cmd"
in the runner configuration, but cmd
will not be maintained, meaning:
- No bug fixes
- No support
- No new features will be added.
- So we have to rewrite our windows scripts in Powershell.
Related links
What is the current bug behavior?
- scripts in
before_script
fail
Relevant logs and/or screenshots
Click to expand
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:189 : 3
00:01
+ if "%CI_COMMIT_REF_NAME%" NEQ "dev" (
+ ~
Parenth�se ouvrante ��(�� manquante apr�s ��if�� dans l'instruction If.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:189 : 27
+ if "%CI_COMMIT_REF_NAME%" NEQ "dev" (
+ ~~~
Jeton inattendu ��NEQ�� dans l'expression ou l'instruction.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:192 : 45
+ git config user.name ${GITLAB_USER_ID}
+ ~
Parenth�se fermante ��)�� manquante dans l'expression.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:193 : 49
+ git config user.email ${GITLAB_USER_EMAIL}
+ ~
Parenth�se fermante ��)�� manquante dans l'expression.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:194 : 22
+ git fetch --all
+ ~
Parenth�se fermante ��)�� manquante dans l'expression.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:198 : 5
+ )
+ ~
Jeton inattendu ��)�� dans l'expression ou l'instruction.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:199 : 3
+ )
+ ~
Jeton inattendu ��)�� dans l'expression ou l'instruction.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:200 : 1
+ )
+ ~
Jeton inattendu ��)�� dans l'expression ou l'instruction.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:208 : 3
+ if not exist "%CI_PROJECT_DIR%/install" md "%CI_PROJECT_DIR%/install"
+ ~
Parenth�se ouvrante ��(�� manquante apr�s ��if�� dans l'instruction If.
Au caract�re C:\Windows\TEMP\build_script276259719\script.ps1:212 : 3
+ if not exist "%CI_PROJECT_DIR%/build" md "%CI_PROJECT_DIR%/build"
+ ~
Parenth�se ouvrante ��(�� manquante apr�s ��if�� dans l'instruction If.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
Possible fixes
- Reactivate powershell on the runner.
- Rewrite our windows scripts in Powershell.
Edited by Julien WAECHTER