docker/windows: add script to build the image with the correct branch and tag

also move the default_branch arg later in the dockerfile to
avoid invalidating previous layers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/287>
This commit is contained in:
Jordan Petridis 2020-04-27 11:10:26 +03:00 committed by GStreamer Merge Bot
parent 6576f2f7b7
commit b8fa6db873
3 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1 @@
build_image.ps1

View file

@ -6,13 +6,13 @@ FROM 'mcr.microsoft.com/windows/servercore:ltsc2019'
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV ErrorActionPreference='Stop'
ARG DEFAULT_BRANCH="master"
COPY install_choco.ps1 C:\
RUN C:\install_choco.ps1
COPY install_toolchain.ps1 C:\
RUN C:\install_toolchain.ps1
ARG DEFAULT_BRANCH="master"
COPY prepare_gst_env.ps1 C:\
RUN C:\prepare_gst_env.ps1

View file

@ -0,0 +1,5 @@
$env:DEFAULT_BRANCH='master'
$env:tag ="registry.freedesktop.org/gstreamer/gst-ci/amd64/windows:v10-$env:DEFAULT_BRANCH"
echo "Building $env:tag"
docker build --build-arg DEFAULT_BRANCH=$env:DEFAULT_BRANCH -f Dockerfile -t $env:tag .
# docker push $tag