gstreamer/docker/windows/build_image.ps1
Jordan Petridis 5c536f2601 docker/windows: build rust image in the ci
This makes it a bit harder to build an image locally with the script,
as now the rust image requires to pass it the base image tag as a
--build-arg. This way though we don't need to duplicate and keep
the string of the image in sync.

Another thing is that now the docker windows image build is properly
passing/replacing build args and we can build non-master versions
of the image too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/405>
2021-09-08 04:47:36 +00:00

27 lines
No EOL
853 B
PowerShell

$env:ErrorActionPreference='Stop'
$env:DEFAULT_BRANCH='master'
$env:VERSION='test'
$env:tag ="registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:$env:VERSION-$env:DEFAULT_BRANCH"
$env:rust_tag ="registry.freedesktop.org/gstreamer/gst-ci/amd64/windows-rust:$env:VERSION-$env:DEFAULT_BRANCH"
Set-Location './docker/windows/'
Get-Date
Write-Output "Building $env:tag"
docker build --isolation=hyperv -m 12g --build-arg DEFAULT_BRANCH=$env:DEFAULT_BRANCH -f Dockerfile -t $env:tag .
if (!$?) {
Write-Host "Failed to build docker image $env:tag"
Exit 1
}
Get-Date
Write-Output "Building $env:rust_tag"
docker build --isolation=hyperv -m 12g --build-arg DEFAULT_BRANCH=$env:DEFAULT_BRANCH -f rust.Dockerfile -t $env:rust_tag .
if (!$?) {
Write-Host "Failed to build docker image $env:rust_tag"
Exit 1
}
Get-Date
Write-Output "Build Finished"