ci_template: make sure powershell hard exists on errors

We set the env var as the shell of the image, but looks like
the gitlab runner is overriding that.
This commit is contained in:
Jordan Petridis 2019-12-05 00:52:45 +02:00
parent b3aa9b5286
commit 5c0ad2facd
No known key found for this signature in database
GPG key ID: 902CC06D159744F5
2 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,7 @@ FROM 'mcr.microsoft.com/windows/servercore:1809'
# Make sure any failure in PowerShell scripts is fatal
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV ErrorActionPreference='Stop'
COPY install_toolchain.ps1 prepare_gst_env.ps1 C:\

View file

@ -421,6 +421,10 @@ valgrind ges:
-Dvaapi=disabled
-Ddevtools=disabled
script:
# Make sure powershell exists on errors
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
- $ErrorActionPreference = "Stop"
- git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git $env:CI_PROJECT_DIR/gst-build
- cd $env:CI_PROJECT_DIR/gst-build
- cp -r C:/subprojects/* subprojects/
@ -464,6 +468,10 @@ build vs2017 x86:
build msys2 :
extends: '.build windows'
script:
# Make sure powershell exists on errors
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6
- $ErrorActionPreference = "Stop"
# For some reason docker build hangs if this is included in the image, needs more troubleshooting
- $env:PATH += ';C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\mingw32\bin'
- C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"