Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ objects:
mkdir -p ~/.ssh
cp /tmp/cluster/ssh-privatekey ~/.ssh/kube_aws_rsa || true
export PROVIDER_ARGS="-provider=aws -gce-zone=us-east-1"
# TODO: make openshift-tests auto-discover this from cluster config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still a TODO. The test suite shouldn't have to be told which region/zone to use, it should be able to discover that just by being pointed at a cluster with a kubeconfig.

REGION="$(oc get -o jsonpath='{.status.platformStatus.aws.region}' infrastructure cluster)"
REGION="$(cat /tmp/artifacts/aws-region)"
ZONE="$(oc get -o jsonpath='{.items[0].metadata.labels.failure-domain\.beta\.kubernetes\.io/zone}' nodes)"
export TEST_PROVIDER="{\"type\":\"aws\",\"region\":\"${REGION}\",\"zone\":\"${ZONE}\",\"multizone\":true,\"multimaster\":true}"
export KUBE_SSH_USER=core
Expand Down Expand Up @@ -440,6 +439,7 @@ objects:
esac
echo "Subnets : ${subnets}"
fi
echo "${AWS_REGION}" > /tmp/artifacts/aws-region
cat > /tmp/artifacts/installer/install-config.yaml << EOF
apiVersion: v1
baseDomain: ${BASE_DOMAIN:-origin-ci-int-aws.dev.rhcloud.com}
Expand Down Expand Up @@ -830,7 +830,7 @@ objects:
export PATH="${HOME}/.local/bin:${PATH}"
easy_install --user pip # our Python 2.7.5 is even too old for ensurepip
pip install --user awscli
export AWS_DEFAULT_REGION="$(python -c 'import json; data = json.load(open("/tmp/artifacts/installer/metadata.json")); print(data["aws"]["region"])')"
export AWS_DEFAULT_REGION="$(cat /tmp/artifacts/aws-region)"
echo "gathering node console output from ${AWS_DEFAULT_REGION}"
fi

Expand Down