Skip to content

Instantly share code, notes, and snippets.

@karthikworld
karthikworld / gcloud_install.sh
Created February 26, 2019 22:37 — forked from satyadeepk/gcloud_install.sh
Jenkins Google Cloud SDK install with auth script
#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
#!/usr/bin/env ruby
# List all network interfaces using the ifconfig tool
# Returns an array of interface names
def list_interfaces
get_interfaces.keys
end
# Get all interfaces details. Returns a hash