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.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220516082310.33876-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Thomas Huth 2022-05-16 10:23:10 +02:00
parent eec398119f
commit e4e68c31db
1 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,13 @@
check-patch: check-patch:
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/centos8:latest image: python:3.10-alpine
needs: needs: []
job: amd64-centos8-container
script: script:
- .gitlab-ci.d/check-patch.py - .gitlab-ci.d/check-patch.py
variables: variables:
GIT_DEPTH: 1000 GIT_DEPTH: 1000
before_script:
- apk -U add git perl
rules: rules:
- if: '$CI_PROJECT_NAMESPACE == "qemu-project"' - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
when: never when: never
@ -15,12 +16,13 @@ check-patch:
check-dco: check-dco:
stage: build stage: build
image: $CI_REGISTRY_IMAGE/qemu/centos8:latest image: python:3.10-alpine
needs: needs: []
job: amd64-centos8-container
script: .gitlab-ci.d/check-dco.py script: .gitlab-ci.d/check-dco.py
variables: variables:
GIT_DEPTH: 1000 GIT_DEPTH: 1000
before_script:
- apk -U add git
rules: rules:
- if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: never when: never