Updated garden releases with new URL, added update-url script for URL migrations

This commit is contained in:
Geoff Franks 2017-01-14 12:16:04 -05:00
parent d1fd4a3f73
commit faeae5b0b2
4 changed files with 33 additions and 5 deletions

View File

@ -1820,11 +1820,11 @@ resources:
type: bosh-io-release
- name: garden-linux
source:
repository: cloudfoundry-incubator/garden-linux-release
repository: cloudfoundry/garden-linux-release
type: bosh-io-release
- name: garden-runc
source:
repository: cloudfoundry-incubator/garden-runc-release
repository: cloudfoundry/garden-runc-release
type: bosh-io-release
- name: grafana
source:

View File

@ -184,8 +184,8 @@ EOF
trap "rm -f ${PIPELINE}/.deploy.yml" INT QUIT TERM EXIT
spruce merge base.yml releases/*.yml stemcells/*.yml > .deploy.yml &&
REDACT=yes spruce merge base.yml releases/*.yml stemcells/*.yml > pipeline.yml &&
fly --target vsphere set-pipeline --pipeline genesis-index --config .deploy.yml &&
fly --target vsphere unpause-pipeline --pipeline genesis-index
fly --target sw set-pipeline --pipeline genesis-index --config .deploy.yml &&
fly --target sw unpause-pipeline --pipeline genesis-index
rm -rf releases stemcells
popd >/dev/null

2
seed
View File

@ -67,7 +67,7 @@ for r in \
cf-redis:pivotal-cf/cf-redis-release \
diego:cloudfoundry/diego-release \
etcd:cloudfoundry-incubator/etcd-release \
garden-linux:cloudfoundry-incubator/garden-linux-release \
garden-linux:cloudfoundry/garden-linux-release \
garden-runc:cloudfoundry/garden-runc-release \
concourse:concourse/concourse \
bosh-warden-cpi:cppforlife/bosh-warden-cpi-release \

28
update-url Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
set -eu
if [[ -z ${GENESIS_CREDS} ]]; then
echo >&2 "GENESIS_CREDS not set. ./indexer will fail"
exit 1
fi
if [[ $# != 3 ]]; then
echo >&2 "Usage: ./update-url (release|stemcell) NAME URL"
exit 1
fi
type=$1
name=$2
url=$3
echo Finding previously indexed versions of ${type} ${name}
VERSIONS=$(./indexer show ${type} ${name} | jq -r ".[].version")
echo Recreating ${type} ${name} with new URL
yes yes | ./indexer delete ${type} ${name}
./indexer create ${type} ${name} ${url}
echo Reprocessing previously indexed versions of ${type} ${name}
for version in ${VERSIONS}; do
./indexer check ${type} ${name} ${version}
done