Make setClusterVersion less brittle
This commit is contained in:
parent
419d43cf9f
commit
ef5fa96ec8
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
# Meant for testing only !!!
|
# Meant for testing only !!!
|
||||||
|
|
||||||
@ -8,5 +9,14 @@
|
|||||||
CONGLOMERATE=$1
|
CONGLOMERATE=$1
|
||||||
VERSION=$2
|
VERSION=$2
|
||||||
|
|
||||||
aws ssm put-parameter --name /cloudbender/${CONGLOMERATE}/kubecontrol/meta/clusterversion --type SecureString --value "$(echo "$VERSION" | base64 -w0)" --overwrite
|
P="/cloudbender/${CONGLOMERATE}/kubecontrol/meta/clusterversion"
|
||||||
|
|
||||||
|
export AWS_DEFAULT_OUTPUT=text
|
||||||
|
|
||||||
|
# First verify we point to an existing clusterVersion
|
||||||
|
OLD=$(aws ssm get-parameter --name $P --with-decryption --query 'Parameter.Value' | base64 -d) || \
|
||||||
|
{ echo "Cannot find an existing SSM parameter. Make sure your AWS profile and parameters are correct."; exit 1; }
|
||||||
|
|
||||||
|
echo "Current version: $OLD"
|
||||||
|
aws ssm put-parameter --name $P --type SecureString --value "$(echo "$VERSION" | base64 -w0)" --overwrite
|
||||||
|
echo "New version: $VERSION"
|
||||||
|
Loading…
Reference in New Issue
Block a user