Add python3 option to jenkins::slave.
Adds a new python3 option to our jenkins slave manifest which can be used to enable using python3-pip when installing *key* pip packages for unit testing (tox, setuptools-git). Also, updates openstack_project::slave so that it supports the option as well. Change-Id: I5face30b09e3e8d2f70b4da83481f4f8bd33fc51 Reviewed-on: https://review.openstack.org/32452 Reviewed-by: James E. Blair <corvus@inaugust.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Elizabeth Krumbach Joseph <lyz@princessleia.com> Approved: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
@@ -5,6 +5,7 @@ class jenkins::slave(
|
||||
$sudo = false,
|
||||
$bare = false,
|
||||
$user = true,
|
||||
$python3 = false,
|
||||
) {
|
||||
|
||||
include pip
|
||||
@@ -132,10 +133,19 @@ class jenkins::slave(
|
||||
'tox',
|
||||
]
|
||||
|
||||
package { $pip_packages:
|
||||
ensure => latest, # we want the latest from these
|
||||
provider => pip,
|
||||
require => Class[pip],
|
||||
if $python3 {
|
||||
include pip::python3
|
||||
package { $pip_packages:
|
||||
ensure => latest, # we want the latest from these
|
||||
provider => pip3,
|
||||
require => Class[pip::python3],
|
||||
}
|
||||
} else {
|
||||
package { $pip_packages:
|
||||
ensure => latest, # we want the latest from these
|
||||
provider => pip,
|
||||
require => Class[pip],
|
||||
}
|
||||
}
|
||||
|
||||
package { 'python-subunit':
|
||||
|
||||
Reference in New Issue
Block a user