Instead of passing the full name of the Python binary as 'python',
only pass the major version as 'pyver' and build everything else
based on that.
Doing so allows us to make a few things, most notably job names,
slightly shorter and nicer.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
I wouldn't bother changing this if the previous change to Python
jobs had already been deployed, but since it hasn't yet might as
well have nicer names instead :)
jobs/python-distutils.yaml | 22 +++++++++++-----------
projects/libvirt-python.yaml | 16 ++++++++--------
projects/virt-manager.yaml | 14 +++++++-------
3 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml
index 122c759..ff68c29 100644
--- a/jobs/python-distutils.yaml
+++ b/jobs/python-distutils.yaml
@@ -1,11 +1,11 @@
- job-template:
id: python-distutils-build-job
- name: '{name}-{branch}-{python}-build'
+ name: '{name}-{branch}-py{pyver}-build'
project-type: matrix
- description: '{title} Build ({python})'
+ description: '{title} Build (Python {pyver})'
command_pre_build: ''
- workspace: '{name}-{branch}-{python}'
+ workspace: '{name}-{branch}-py{pyver}'
child-workspace: '.'
block-downstream: true
block-upstream: true
@@ -43,8 +43,8 @@
{global_env}
{local_env}
{command_pre_build}
- {python} ./setup.py build
- {python} ./setup.py install --prefix=$VIRT_PREFIX
+ python{pyver} ./setup.py build
+ python{pyver} ./setup.py install --prefix=$VIRT_PREFIX
publishers:
- email:
recipients: '{obj:spam}'
@@ -54,9 +54,9 @@
- job-template:
id: python-distutils-check-job
- name: '{name}-{branch}-{python}-check'
+ name: '{name}-{branch}-py{pyver}-check'
project-type: matrix
- description: '{title} Check ({python})'
+ description: '{title} Check (Python {pyver})'
workspace: '{name}-{branch}'
child-workspace: '.'
block-downstream: true
@@ -83,7 +83,7 @@
- shell: |
{global_env}
{local_env}
- {python} ./setup.py test
+ python{pyver} ./setup.py test
publishers:
- email:
recipients: '{obj:spam}'
@@ -92,9 +92,9 @@
- job-template:
id: python-distutils-rpm-job
- name: '{name}-{branch}-{python}-rpm'
+ name: '{name}-{branch}-py{pyver}-rpm'
project-type: matrix
- description: '{title} RPM ({python})'
+ description: '{title} RPM (Python {pyver})'
workspace: '{name}-{branch}'
child-workspace: '.'
block-downstream: true
@@ -122,7 +122,7 @@
{global_env}
{local_env}
sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in
- {python} ./setup.py rpm
+ python{pyver} ./setup.py rpm
publishers:
- email:
recipients: '{obj:spam}'
diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml
index e065c5d..1c29321 100644
--- a/projects/libvirt-python.yaml
+++ b/projects/libvirt-python.yaml
@@ -14,10 +14,10 @@
title: Libvirt Python
jobs:
- python-distutils-build-job:
- python: python2
+ pyver: 2
parent_jobs: 'libvirt-master-build'
- python-distutils-build-job:
- python: python3
+ pyver: 3
parent_jobs: 'libvirt-master-build'
machines:
- libvirt-debian-8
@@ -28,11 +28,11 @@
- libvirt-freebsd-10
- libvirt-freebsd-11
- python-distutils-check-job:
- python: python2
- parent_jobs: 'libvirt-python-master-{python}-build'
+ pyver: 2
+ parent_jobs: 'libvirt-python-master-py{pyver}-build'
- python-distutils-check-job:
- python: python3
- parent_jobs: 'libvirt-python-master-{python}-build'
+ pyver: 3
+ parent_jobs: 'libvirt-python-master-py{pyver}-build'
machines:
- libvirt-debian-8
- libvirt-debian-9
@@ -42,8 +42,8 @@
- libvirt-freebsd-10
- libvirt-freebsd-11
- python-distutils-rpm-job:
- python: python2
- parent_jobs: 'libvirt-python-master-{python}-check'
+ pyver: 2
+ parent_jobs: 'libvirt-python-master-py{pyver}-check'
machines:
- libvirt-centos-6
- libvirt-centos-7
diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml
index b5b0df5..8f3112e 100644
--- a/projects/virt-manager.yaml
+++ b/projects/virt-manager.yaml
@@ -11,18 +11,18 @@
title: Virtual Machine Manager
jobs:
- python-distutils-build-job:
- python: python3
+ pyver: 3
parent_jobs:
- - 'libvirt-python-master-{python}-build'
+ - 'libvirt-python-master-py{pyver}-build'
- 'libosinfo-master-build'
command_pre_build: |
- {python} ./setup.py configure --prefix=$VIRT_PREFIX
+ python{pyver} ./setup.py configure --prefix=$VIRT_PREFIX
- python-distutils-check-job:
- python: python3
- parent_jobs: 'virt-manager-master-{python}-build'
+ pyver: 3
+ parent_jobs: 'virt-manager-master-py{pyver}-build'
- python-distutils-rpm-job:
- python: python3
- parent_jobs: 'virt-manager-master-{python}-check'
+ pyver: 3
+ parent_jobs: 'virt-manager-master-py{pyver}-check'
machines:
- libvirt-fedora-26
- libvirt-fedora-27
--
2.14.3
Show replies by date
On Wed, Feb 14, 2018 at 12:47:04PM +0100, Andrea Bolognani wrote:
Instead of passing the full name of the Python binary as
'python',
only pass the major version as 'pyver' and build everything else
based on that.
Doing so allows us to make a few things, most notably job names,
slightly shorter and nicer.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
I wouldn't bother changing this if the previous change to Python
jobs had already been deployed, but since it hasn't yet might as
well have nicer names instead :)
jobs/python-distutils.yaml | 22 +++++++++++-----------
projects/libvirt-python.yaml | 16 ++++++++--------
projects/virt-manager.yaml | 14 +++++++-------
3 files changed, 26 insertions(+), 26 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
Regards,
Daniel
--
|:
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 :|