Commit 6f30aa78 authored by CJ Cullen's avatar CJ Cullen

Make GKE-CI test firewalls work on Jenkins

parent b3ab7d8d
...@@ -160,6 +160,7 @@ function kube-up() { ...@@ -160,6 +160,7 @@ function kube-up() {
# Assumed vars: # Assumed vars:
# CLUSTER_NAME # CLUSTER_NAME
# GCLOUD # GCLOUD
# ZONE
# Vars set: # Vars set:
# MINION_TAG # MINION_TAG
function test-setup() { function test-setup() {
...@@ -169,7 +170,7 @@ function test-setup() { ...@@ -169,7 +170,7 @@ function test-setup() {
detect-minions >&2 detect-minions >&2
# At this point, CLUSTER_NAME should have been used, so its value is final. # At this point, CLUSTER_NAME should have been used, so its value is final.
MINION_TAG=$($GCLOUD compute instances describe ${MINION_NAMES[0]} | grep -o "gke-${CLUSTER_NAME}-.\{8\}-node" | head -1) MINION_TAG=$($GCLOUD compute instances describe ${MINION_NAMES[0]} --project="${PROJECT}" --zone="${ZONE}" | grep -o "gke-${CLUSTER_NAME}-.\{8\}-node" | head -1)
OLD_MINION_TAG="k8s-${CLUSTER_NAME}-node" OLD_MINION_TAG="k8s-${CLUSTER_NAME}-node"
# Open up port 80 & 8080 so common containers on minions can be reached. # Open up port 80 & 8080 so common containers on minions can be reached.
...@@ -305,13 +306,14 @@ function restart-apiserver() { ...@@ -305,13 +306,14 @@ function restart-apiserver() {
# CLUSTER_NAME # CLUSTER_NAME
# GCLOUD # GCLOUD
# KUBE_ROOT # KUBE_ROOT
# ZONE
function test-teardown() { function test-teardown() {
echo "... in test-teardown()" >&2 echo "... in test-teardown()" >&2
detect-project >&2 detect-project >&2
detect-minions >&2 detect-minions >&2
# At this point, CLUSTER_NAME should have been used, so its value is final. # At this point, CLUSTER_NAME should have been used, so its value is final.
MINION_TAG=$($GCLOUD compute instances describe ${MINION_NAMES[0]} | grep -o "gke-${CLUSTER_NAME}-.\{8\}-node" | head -1) MINION_TAG=$($GCLOUD compute instances describe ${MINION_NAMES[0]} --project="${PROJECT}" --zone="${ZONE}" | grep -o "gke-${CLUSTER_NAME}-.\{8\}-node" | head -1)
# First, remove anything we did with test-setup (currently, the firewall). # First, remove anything we did with test-setup (currently, the firewall).
# NOTE: Keep in sync with names above in test-setup. # NOTE: Keep in sync with names above in test-setup.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment