cloudbuild.gke-per-test.yaml [95:130]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    }

    until [[ -n "$(get_nodeport)" ]]; do
        echo "querying for nodeport"
        sleep 3
    done

    echo "$(get_nodeport)" > _nodeport # save port for use in next step

    # grab the public IP of a random node
    # (why do this instead of a load balancer? b/c it's faster to instantiate)
    # (and doesn't require additional billable resources)
    # (we can reasonably expect the node to be durable enough to last until the test completes)
    get_nodeip() {
      kubectl get nodes --output jsonpath='{.items[0].status.addresses[?(@.type=="ExternalIP")].address}'
    }

    until [[ -n "$(get_nodeip)" ]]; do
        echo "querying for nodeip"
        sleep 3
    done

    echo $(get_nodeip) > _nodeip # save ip for use in next step

  waitFor: ['deploy to staging']

- id: 'integration tests'
  name: 'gcr.io/cloud-builders/curl'
  entrypoint: '/bin/bash'
  args: 
  - '-c'
  - |
    ### -r = retries; -i = interval; -k = keyword to search for ###
    ./test/test-connection.sh -r 20 -i 3 -u http://$(cat _nodeip):$(cat _nodeport)
    ./test/test-content.sh -r 20 -i 3 -u http://$(cat _nodeip):$(cat _nodeport) -k 'Chocolate Chip'
  waitFor: ['get endpoint']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cloudbuild.gke.yaml [87:122]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    }

    until [[ -n "$(get_nodeport)" ]]; do
        echo "querying for nodeport"
        sleep 3
    done

    echo "$(get_nodeport)" > _nodeport # save port for use in next step

    # grab the public IP of a random node
    # (why do this instead of a load balancer? b/c it's faster to instantiate)
    # (and doesn't require additional billable resources)
    # (we can reasonably expect the node to be durable enough to last until the test completes)
    get_nodeip() {
      kubectl get nodes --output jsonpath='{.items[0].status.addresses[?(@.type=="ExternalIP")].address}'
    }

    until [[ -n "$(get_nodeip)" ]]; do
        echo "querying for nodeip"
        sleep 3
    done

    echo $(get_nodeip) > _nodeip # save ip for use in next step

  waitFor: ['deploy to staging']

- id: 'integration tests'
  name: 'gcr.io/cloud-builders/curl'
  entrypoint: '/bin/bash'
  args: 
  - '-c'
  - |
    ### -r = retries; -i = interval; -k = keyword to search for ###
    ./test/test-connection.sh -r 20 -i 3 -u http://$(cat _nodeip):$(cat _nodeport)
    ./test/test-content.sh -r 20 -i 3 -u http://$(cat _nodeip):$(cat _nodeport) -k 'Chocolate Chip'
  waitFor: ['get endpoint']
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



