Skip to contentSkip to conversation

gitlab-ci: Switch the container of the 'check-patch' & 'check-dco' jobs

PATCH In review Thomas Huth 4 participants 5 messages May 16, 2022 – May 27, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gitlab-ci: Switch the container of the 'check-patch' & 'check-dco' jobs

The 'check-patch' and 'check-dco' jobs only need Python and git for checking the patches, so it's not really necessary to use a container here that has all the other build dependencies installed. By using a lightweight Alpine container, we can improve the runtime here quite a bit, cutting it down from ca. 1:30 minutes to ca. 45 seconds.

---
v2: Use python:alpine for even quicker execution

 .gitlab-ci.d/static_checks.yml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
.gitlab-ci.d/static_checks.yml +8 -6
index 5e955540d3..94858e3272 100644
@@ -1,12 +1,13 @@
 check-patch:
   stage: build
-  image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
-  needs:
-    job: amd64-centos8-container
+  image: python:3.10-alpine
+  needs: []
   script:
     - .gitlab-ci.d/check-patch.py
   variables:
     GIT_DEPTH: 1000
+  before_script:
+    - apk -U add git perl
   rules:
     - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
       when: never
@@ -15,12 +16,13 @@ check-patch:
 
 check-dco:
   stage: build
-  image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
-  needs:
-    job: amd64-centos8-container
+  image: python:3.10-alpine
+  needs: []
   script: .gitlab-ci.d/check-dco.py
   variables:
     GIT_DEPTH: 1000
+  before_script:
+    - apk -U add git
   rules:
     - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
       when: never
Signature · 1 line
2.27.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Thomas Huth

The 'check-patch' and 'check-dco' jobs only need Python and git for checking the patches, so it's not really necessary to use a container here that has all the other build dependencies installed. By using a lightweight Alpine container, we can improve the runtime here quite a bit, cutting it down from ca. 1:30 minutes to ca. 45 seconds.

Quoted 7 lines

---
v2: Use python:alpine for even quicker execution

 .gitlab-ci.d/static_checks.yml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by
#2 lore raw
Quoted 13 lines · Daniel P. Berrangé
Quoted 11 lines · Thomas Huth

The 'check-patch' and 'check-dco' jobs only need Python and git for checking the patches, so it's not really necessary to use a container here that has all the other build dependencies installed. By using a lightweight Alpine container, we can improve the runtime here quite a bit, cutting it down from ca. 1:30 minutes to ca. 45 seconds.

---
v2: Use python:alpine for even quicker execution

Quoted 5 lines
Quoted 2 lines
 .gitlab-ci.d/static_checks.yml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Looks good.

Sorry for fooling you with my python container -- I am using it to ensure a very wide spectrum of version compatibility.

#3 lore raw
In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

The 'check-patch' and 'check-dco' jobs only need Python and git for checking the patches, so it's not really necessary to use a container here that has all the other build dependencies installed. By using a lightweight Alpine container, we can improve the runtime here quite a bit, cutting it down from ca. 1:30 minutes to ca. 45 seconds.

Queued to testing/next, thanks.

Signature · 1 line
Alex Bennée
#4 lore raw
Quoted 8 lines · Alex Bennée
Quoted 6 lines · Thomas Huth

The 'check-patch' and 'check-dco' jobs only need Python and git for checking the patches, so it's not really necessary to use a container here that has all the other build dependencies installed. By using a lightweight Alpine container, we can improve the runtime here quite a bit, cutting it down from ca. 1:30 minutes to ca. 45 seconds.

Quoted 4 lines
Quoted 2 lines

Queued to testing/next, thanks.

And it didn't apply because it was already merged - sorry about that ;-)

Signature · 1 line
Alex Bennée