ci: Update fedora image for cerbero trigger
authorXavier Claessens <xavier.claessens@collabora.com>
Tue, 5 Oct 2021 00:24:58 +0000 (20:24 -0400)
committerJordan Petridis <jordan@centricular.com>
Tue, 5 Oct 2021 20:54:13 +0000 (23:54 +0300)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/931>

.gitlab-ci.yml
ci/docker/fedora/prepare.sh
ci/gitlab/trigger_cerbero_pipeline.py

index d655aea..305c9ba 100644 (file)
@@ -24,7 +24,7 @@ variables:
   # If you are hacking on them or need a them to rebuild, its enough
   # to change any part of the string of the image you want.
   ###
-  FEDORA_TAG:  '2021-10-04.0'
+  FEDORA_TAG:  '2021-10-05.0'
   INDENT_TAG: '2021-10-04.0'
   WINDOWS_TAG: "2021-10-04.1"
 
@@ -760,17 +760,14 @@ build documentation:
 # https://gitlab.com/gitlab-org/gitlab/-/issues/341737
 cerbero trigger:
   stage: build
-  image: $FEDORA_IMAGE
+  extends:
+    - '.fedora image'
+    - '.fdo.suffixed-image@fedora'
   needs:
     - "fedora amd64 docker"
   script:
-    - python3 -m pip install --user python-gitlab
     - ci/gitlab/trigger_cerbero_pipeline.py
 
-  variables:
-    # Use GST_UPSTREAM_BRANCH
-    UPSTREAM_BRANCH: 'main'
-
   rules:
     - changes:
       - .gitlab-ci.yml
index f3092bf..9ab1d98 100644 (file)
@@ -202,7 +202,8 @@ dnf builddep -y gstreamer1 \
     python3-gstreamer1
 
 dnf remove -y meson
-pip3 install meson==0.59.1 hotdoc
+pip3 install meson==0.59.1 hotdoc python-gitlab
+
 
 # Remove gst-devel packages installed by builddep above
 dnf remove -y "gstreamer1*devel"
@@ -252,4 +253,4 @@ echo "Removing DNF cache"
 dnf clean all
 
 rm -R /root/*
-rm -rf /var/cache/dnf /var/log/dnf*
\ No newline at end of file
+rm -rf /var/cache/dnf /var/log/dnf*
index 5e89135..74a1f61 100755 (executable)
@@ -7,6 +7,7 @@ import gitlab
 
 CERBERO_ID = 1340
 
+
 class Status:
     FAILED = 'failed'
     MANUAL = 'manual'
@@ -30,6 +31,7 @@ def fprint(msg):
     print(msg, end="")
     sys.stdout.flush()
 
+
 if __name__ == "__main__":
     gl = gitlab.Gitlab(
         "https://gitlab.freedesktop.org/",
@@ -40,7 +42,7 @@ if __name__ == "__main__":
     cerbero = gl.projects.get(CERBERO_ID)
     pipe = cerbero.trigger_pipeline(
         token=os.environ['CI_JOB_TOKEN'],
-        ref=os.environ["UPSTREAM_BRANCH"],
+        ref=os.environ["GST_UPSTREAM_BRANCH"],
         variables={
             "CI_GSTREAMER_URL": os.environ["CI_PROJECT_URL"],
             "CI_GSTREAMER_REF_NAME": os.environ["CI_COMMIT_REF_NAME"],
@@ -56,4 +58,3 @@ if __name__ == "__main__":
             sys.exit(0 if pipe.status == Status.SUCCESS else 1)
         else:
             fprint(".")
-