Fix whitespace in ara install version checking

We have extra whitespace in the pip installed package listing that we
don't have in the upstream pypi package search so our string comparison
of the versions breaks. Fix this by trimming extra whitespace.

Change-Id: I04b28508ff9371397d42957f0d086aa9bb63a4f7
This commit is contained in:
Clark Boylan 2018-01-19 15:08:37 -08:00 committed by Monty Taylor
parent 241a72bbd6
commit ab65041a1a
2 changed files with 2 additions and 4 deletions

View File

@ -47,10 +47,7 @@ class zuul::executor (
# that ara's deps don't inadverdently update zuuls deps (specifically
# ansible).
#
# TODO: This check appears to always fail, causing ara to be
# installed on every puppet run. When this is fixed, update the
# beaker rspec to include zuul::executor.
onlyif => '/bin/bash -c "test \\"$(pip3 list --format columns | sed -ne \'s/^ara\s\+\(.*\)$/\1/p\')\\" != \\"$(pip3 search \'ara$\' | sed -ne \'s/^ara (\(.*\)).*$/\1/p\')\\""',
onlyif => '/bin/bash -c "test \\"$(pip3 list --format columns | sed -ne \'s/^ara\s\+\([.0-9]\+\)\s\+$/\1/p\')\\" != \\"$(pip3 search \'ara$\' | sed -ne \'s/^ara (\(.*\)).*$/\1/p\')\\""',
require => Class['::pip::python3'],
}

View File

@ -13,6 +13,7 @@ class { '::zuul::scheduler':
}
class { '::zuul::merger': }
class { '::zuul::executor': }
class { '::zuul::web': }
class { '::zuul::fingergw': }