ci: fix the windows-rust image builds
authorJordan Petridis <jordan@centricular.com>
Tue, 26 Apr 2022 17:00:16 +0000 (20:00 +0300)
committerJordan Petridіs <jpetridis@gnome.org>
Thu, 5 May 2022 21:33:43 +0000 (21:33 +0000)
There was a rule gated on the project name which wasn't removed
once we moved to the monorepo and this job was silently broken
since.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2302>

.gitlab-ci.yml
ci/docker/windows/install_gst.ps1

index 743f0e2..357d963 100644 (file)
@@ -198,8 +198,6 @@ windows amd64 docker:
   needs:
     - job: 'windows amd64 docker'
       artifacts: false
-  rules:
-    - if: '$CI_PROJECT_NAME == "gst-ci"'
   variables:
     # Unlike the buildah/linux jobs, this file
     # needs to be relative to docker/windows/ subdir
@@ -207,7 +205,7 @@ windows amd64 docker:
     #
     # We also don't need a CONTEXT_DIR var as its also
     # hardcoded to be docker/windows/
-    DOCKERFILE: 'docker/windows/rust.Dockerfile'
+    DOCKERFILE: 'ci/docker/windows/rust.Dockerfile'
   tags:
     - 'windows'
     - 'shell'
@@ -216,11 +214,7 @@ windows amd64 docker:
     # We need to pass an array and to resolve the env vars, so we can't use a variable:
     - $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH", "--build-arg", "BASE_IMAGE=$WINDOWS_IMAGE", "--build-arg", "RUST_VERSION=$RUST_VERSION")
 
-    - $env:WINDOWS_CONTAINER_SCRIPT_PATH = "$env:CI_PROJECT_DIR\container.ps1"
-    - echo "Fetching $env:WINDOWS_CONTAINER_SCRIPT_URL"
-    - Invoke-WebRequest -Uri $env:WINDOWS_CONTAINER_SCRIPT_URL -OutFile $env:WINDOWS_CONTAINER_SCRIPT_PATH
-
-    - "& $env:WINDOWS_CONTAINER_SCRIPT_PATH $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
+    - "& ci/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $RUST_IMAGE $RUST_UPSTREAM_IMAGE $DOCKERFILE"
     - |
       if (!($?)) {
         echo "Failed to build the image"
index 7d961cd..b346c87 100644 (file)
@@ -1,19 +1,16 @@
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
 
-# Download gst-build and all its subprojects
-# git clone -b $env:DEFAULT_BRANCH https://gitlab.freedesktop.org/gstreamer/gst-build.git C:\gst-build
-# FIXME: need 1.19+ for cairo subproject :/
-# Should use a stable branch instead
-git clone -b master --depth 1 https://gitlab.freedesktop.org/gstreamer/gst-build.git C:\gst-build
+# Download gstreamer and all its subprojects
+git clone -b $env:DEFAULT_BRANCH --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git C:\gstreamer
 if (!$?) {
-  Write-Host "Failed to clone gst-build"
+  Write-Host "Failed to clone gstreamer"
   Exit 1
 }
 
-Set-Location C:\gst-build
+Set-Location C:\gstreamer
 
 # Copy the cache we already have in the image to avoid massive redownloads
-Move-Item C:/subprojects/*  C:\gst-build\subprojects
+Move-Item C:/subprojects/*  C:\gstreamer\subprojects
 
 if (!$?) {
   Write-Host "Failed to copy subprojects cache"
@@ -29,14 +26,6 @@ if (!$?) {
   Exit 1
 }
 
-Write-Output "Running git update"
-python git-update --no-interaction
-
-if (!$?) {
-  Write-Host "Failed to run git-update"
-  Exit 1
-}
-
 $env:MESON_ARGS = "-Dglib:installed_tests=false " +
     "-Dlibnice:tests=disabled " +
     "-Dlibnice:examples=disabled " +