Skip to content

Commit

Permalink
better detection of stemcell already existing
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed May 15, 2018
1 parent 1c9b9a2 commit 7ce734a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/scripts/export-release
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ set -eu

#
# stemcell metadata/upload
# Currently using candidate heavy stemcells for Xenial
#

STEMCELL_CPI=${STEMCELL_CPI:-warden-boshlite}
STEMCELL_OS=${STEMCELL_OS:-ubuntu-trusty}
STEMCELL_VERSION_MINOR=$(cat stemcell/version)
STEMCELL_VERSION=1.${STEMCELL_VERSION_MINOR}

if [[ $(bosh stemcells --json | jq -r ".Tables[0].Rows[] | select(.os == \"${STEMCELL_OS}\") | .version | test(\"${STEMCELL_VERSION}\")" | grep true) != "true" ]]; then
if [[ $(bosh stemcells --json | jq -r ".Tables[0].Rows[] | select(.os == \"${STEMCELL_OS}\") | .version | test(\"${STEMCELL_VERSION}\")" | grep true | uniq) != "true" ]]; then
# https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent?v=3586.7
bosh -n upload-stemcell "https://bosh.io/d/stemcells/bosh-${STEMCELL_CPI}-${STEMCELL_OS}-go_agent?v=${STEMCELL_VERSION}"
fi

Expand Down

0 comments on commit 7ce734a

Please sign in to comment.