Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/test/groovy/GsutilStepTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class GsutilStepTests extends ApmBasePipelineTest {
script.call(command: 'cp', credentialsId: 'foo')
printCallStack()
assertTrue(assertMethodCallContainsPattern('withEnv', 'PATH+GSUTIL'))
assertTrue(assertMethodCallContainsPattern('bat', 'wget -q -O gsutil.zip https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-319.0.0-windows-x86_64.zip'))
assertTrue(assertMethodCallContainsPattern('bat', 'wget -q -O gsutil.zip https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-319.0.0-windows-x86_64-bundled-python.zip'))
assertJobStatusSuccess()
}
}
10 changes: 7 additions & 3 deletions vars/gsutil.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ def downloadWithCurl(tarball, url) {

def googleCloudSdkURL() {
def url = 'https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-319.0.0'
def os = isUnix() ? 'linux' : 'windows'
def ext = isUnix() ? 'tar.gz' : 'zip'
return "${url}-${os}-${is64() ? 'x86_64' : 'x86'}.${ext}"
def arch = is64() ? 'x86_64' : 'x86'
if (isUnix()) {
return "${url}-linux-${arch}.tar.gz"
} else {
// use the bundled python artifact to avoid issues with the existing python2 installation when running gsutil in some Windows versions
return "${url}-windows-${arch}-bundled-python.zip"
}
}

def uncompress(tarball) {
Expand Down