diff options
author | Andrea Bolognani <abologna@redhat.com> | 2020-05-22 18:29:08 +0200 |
---|---|---|
committer | Andrea Bolognani <abologna@redhat.com> | 2020-05-22 18:29:22 +0200 |
commit | dc5edeb0878e363227fefb1333320b08e1dd5d93 (patch) | |
tree | c077176cc3d207edf698f7cfd7e16e0e042fd6db /.gitlab-ci.yml | |
parent | 68f5bd0bbcbce6a0f2fc3c271d2afcc5ae23f787 (diff) | |
download | libvirt-python-dc5edeb0878e363227fefb1333320b08e1dd5d93.tar.gz |
ci: Make job skips more flexible
Instead of hardcoding the names of the targets for which certain
steps should be skipped, use a separate variable to store that
information.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71afae3..8d1691a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,7 @@ stages: - $PYTHON setup.py build - $PYTHON setup.py test - $PYTHON setup.py sdist - - if test -x /usr/bin/rpmbuild && test $NAME != "opensuse-151" ; then rpmbuild --nodeps -ta dist/libvirt-python*tar.gz ; fi + - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta dist/libvirt-python*tar.gz ; fi .dist_build_job_template: &dist_build_job_definition image: $CI_REGISTRY_IMAGE/ci-$NAME:latest @@ -56,7 +56,7 @@ stages: - $PYTHON setup.py build - $PYTHON setup.py test - $PYTHON setup.py sdist - - if test -x /usr/bin/rpmbuild && test $NAME != "opensuse-151" ; then rpmbuild --nodeps -ta dist/libvirt-python*tar.gz ; fi + - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta dist/libvirt-python*tar.gz ; fi # Check that all commits are signed-off for the DCO. # Skip on "libvirt" namespace, since we only need to run @@ -115,6 +115,7 @@ opensuse-151-container: <<: *container_job_definition variables: NAME: opensuse-151 + RPM: skip ubuntu-1804-container: <<: *container_job_definition @@ -177,6 +178,7 @@ opensuse-151-dist-build: <<: *dist_build_job_definition variables: NAME: opensuse-151 + RPM: skip ubuntu-1804-dist-build: <<: *dist_build_job_definition |