Skip to content

Commit

Permalink
Tests/Minikube - Fix Google credentials (#194)
Browse files Browse the repository at this point in the history
* Tests/Minikube - Downgraded Docker to 18.06.1

* Passing the GOOGLE_APPLICATION_CREDENTIALS env variable

* Copying the credentials file

* Using the home directory for the credentials file.
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Nov 12, 2018
1 parent 21869d6 commit a104f1a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/minikube/install_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

DOCKER_VERSION=18.06.1~ce~3-0~$(. /etc/os-release; echo "$ID")

sudo apt-get update -y
sudo apt-get install -y \
apt-transport-https \
Expand All @@ -29,4 +31,4 @@ sudo add-apt-repository \
stable"

sudo apt-get update -y
sudo apt-get install docker-ce -y
sudo apt-get install docker-ce="${DOCKER_VERSION}" -y
2 changes: 1 addition & 1 deletion test/minikube/install_docker_minikube_argo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

repo_test_dir=$(dirname $0)

"${repo_test_dir}/install_docker.sh"
DOCKER_VERSION=18.06.1~ce~3-0~$(. /etc/os-release; echo "$ID") "${repo_test_dir}/install_docker.sh"
MINIKUBE_VERSION=v0.30.0 KUBECTL_VERSION=v1.12.2 KUBERNETES_VERSION=v1.12.2 "${repo_test_dir}/install_and_start_minikube_without_vm.sh"
ARGO_VERSION=v2.2.0 "${repo_test_dir}/install_argo_client.sh"
sudo apt-get install socat #needed for port forwarding
5 changes: 4 additions & 1 deletion test/presubmit-tests-gce-minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ if [ "$(whoami)" == root ]; then
export USER=not-root
fi

#Copy service account keys
gcloud compute scp --zone=$ZONE --verbosity=error "$GOOGLE_APPLICATION_CREDENTIALS" $instance_name:"~/service-account.json"

#Copy repo
git_root=$(git rev-parse --show-toplevel)
git_root_parent=$(dirname "$git_root")
Expand All @@ -79,7 +82,7 @@ gcloud compute scp --zone=$ZONE --verbosity=error --recurse "$git_root" $instanc
gcloud compute ssh --zone=$ZONE $instance_name -- "~/pipelines/test/minikube/install_docker_minikube_argo.sh"

#Running the presubmit tests
gcloud compute ssh --zone=$ZONE $instance_name -- PULL_PULL_SHA="$PULL_PULL_SHA" WORKSPACE="~/${WORKSPACE}" "~/pipelines/test/presubmit-tests.sh" --cluster-type none "$@"
gcloud compute ssh --zone=$ZONE $instance_name -- PULL_PULL_SHA="$PULL_PULL_SHA" WORKSPACE="~/${WORKSPACE}" GOOGLE_APPLICATION_CREDENTIALS="~/service-account.json" "~/pipelines/test/presubmit-tests.sh" --cluster-type none "$@"

#Copy back the artifacts
mkdir -p "${ARTIFACT_DIR}"
Expand Down

0 comments on commit a104f1a

Please sign in to comment.