From 45b3ddacc265cc512458cecc738ece350f1ded94 Mon Sep 17 00:00:00 2001 From: Moritz Maxeiner <mm@ucw.sh> Date: Sun, 9 Dec 2018 22:04:42 +0100 Subject: [PATCH] windows: Update Library.ps1 name, location, and contents --- windows/base/Dockerfile | 2 +- windows/base/{Library.ps1 => Profile.ps1} | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) rename windows/base/{Library.ps1 => Profile.ps1} (50%) diff --git a/windows/base/Dockerfile b/windows/base/Dockerfile index 6ce4370..c56e394 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 efe2324..1bdef09 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-*)") +} -- GitLab