gstreamer/docker/windows/build_image.ps1
Jordan Petridis 8f0481f19a docker/windows: make the powershell scripts more robust
Check the exit codes of various commands and fail
appropriatly upon error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/392>
2021-02-25 04:25:25 +02:00

22 lines
No EOL
545 B
PowerShell

$env:DEFAULT_BRANCH='master'
$env:VERSION='v18'
$env:tag ="registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:$env:VERSION-$env:DEFAULT_BRANCH"
Get-Date
Write-Output "Building $env:tag"
docker build --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 "Pushing $env:tag"
# docker push $env:tag
# if (!$?) {
# Write-Host "Failed to push docker image $env:tag"
# Exit 1
# }
Get-Date
Write-Output "Build Finished"