-
-
Save karthikworld/c4e3b5cddbf3d6b161b5cfa85cce4d62 to your computer and use it in GitHub Desktop.
Jenkins Google Cloud SDK install with auth script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ref: https://github.com/circleci/android-cloud-test-lab/blob/master/circle.yml | |
export DIRECTORY="/var/jenkins_home/GoogleCloudSDK/google-cloud-sdk/bin" | |
if [ ! -d "$DIRECTORY" ]; then | |
# Control will enter here if $DIRECTORY doesn't exist. | |
cd /var/jenkins_home | |
wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip -O google-cloud-sdk.zip | |
unzip -o google-cloud-sdk.zip -d ./GoogleCloudSDK/ | |
./GoogleCloudSDK/google-cloud-sdk/install.sh | |
fi | |
export PATH=/var/jenkins_home/GoogleCloudSDK/google-cloud-sdk/bin:$PATH | |
gcloud --quiet components update | |
gcloud --quiet components install beta | |
gcloud auth activate-service-account --key-file $GCLOUD_SERVICE_AUTH | |
gcloud config set project addodoc-1 | |
gcloud beta test android run --app $WORKSPACE/app/build/outputs/apk/app-debug.apk --test $WORKSPACE/app/build/outputs/apk/app-debug-androidTest-unaligned.apk --results-bucket cloud-test-jenkins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment