diff --git a/windows/base/Dockerfile b/windows/base/Dockerfile index 6ce437031f9d5774634b37ab464be256758eb290..c56e394fba4a30595d1b6a1d5970ffac34da2122 100644 --- a/windows/base/Dockerfile +++ b/windows/base/Dockerfile @@ -20,7 +20,7 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl choco install -y python --version 3.7.1; \ $env:PATH = "\"$([Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::User));$([Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine))\""; \ python -m pip --no-cache-dir install --no-warn-script-location wheel -COPY Library.ps1 C:/Library.ps1 +COPY Profile.ps1 C:/Users/ContainerAdministrator/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 COPY qtifwsilent.qs C:/qtifwsilent.qs RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ diff --git a/windows/base/Library.ps1 b/windows/base/Profile.ps1 similarity index 50% rename from windows/base/Library.ps1 rename to windows/base/Profile.ps1 index efe232401669206c33b1a8ef8603a3edc42e9d11..1bdef093dbe96210f36327702e8242f76d9024de 100644 --- a/windows/base/Library.ps1 +++ b/windows/base/Profile.ps1 @@ -26,3 +26,21 @@ function Must-Run { Exit(1) } } + +# +# Fetches GitLab CI job artifacts +# +function GitLab-Fetch-Artifacts { + & curl.exe -o artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://git.imp.fu-berlin.de/api/v4/projects/$($args[0])/jobs/artifacts/$($args[1])/download?job=$($args[2])" + 7z e artifacts.zip; Remove-Item -Force artifacts.zip +} + +# +# Sets up a CMake package for find_package from a tarball +# +function CMake-Integrate-Package { + $name = $args[0] + 7z e $name-*.tar.xz; Remove-Item -Force $name-*.tar.xz + 7z x $name-*.tar; Remove-Item -Force $name-*.tar + [Environment]::SetEnvironmentVariable("${name}_ROOT", "$(resolve-path $name-*)") +}