Ensure that only the right blueocean-parent- tags get considered for dockerizing

This commit is contained in:
R. Tyler Croy 2017-01-11 21:15:51 -08:00
parent 6e5295d671
commit 1718f6f970
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 1 additions and 2 deletions

View File

@ -3,8 +3,7 @@
HERE=$(dirname $0)
cd $HERE
BLUEOCEAN_VERSION=$(git for-each-ref --sort=-taggerdate refs/tags | tail -n 1 | awk '{print $3 }' | sed 's/refs\/tags\/blueocean-parent-//')
BLUEOCEAN_VERSION=$(git for-each-ref --count=1 --sort=-taggerdate refs/tags/blueocean-parent-\* | awk '{print $3 }' | sed 's/refs\/tags\/blueocean-parent-//')
# Check if the image already exists
if docker pull jenkinsci/blueocean:$BLUEOCEAN_VERSION; then