|
1 | 1 | // Please do not Save the Jenkins pipeline with a modified script. |
2 | 2 | // Instead, use the Replay function to test build script changes, then commit final changes |
3 | 3 | // to the sdkbuilds-jenkinsfile repository. |
4 | | -def DOTNET_SDK_VERSIONS = ["2.1.816", "3.1.410", "5.0.404", "6.0.101"] |
5 | | -def DOTNET_SDK_VERSION = "6.0.101" |
| 4 | +def DOTNET_SDK_VERSIONS = ["6.0.412"] |
| 5 | +def DOTNET_SDK_VERSION = "6.0.412" |
6 | 6 | def BUILD_VARIANT = IS_GERRIT_TRIGGER ? "buildbot" : "latest" |
7 | 7 | def SUFFIX = "r${BUILD_NUMBER}" |
8 | 8 | def BRANCH = "" |
@@ -293,53 +293,3 @@ def installSdksForPlatform(PLATFORM, DOTNET_SDK_VERSIONS) { |
293 | 293 | } |
294 | 294 | } |
295 | 295 | } |
296 | | - |
297 | | -def selectSDK(BRANCH, DOTNET_SDK_VERSIONS){ |
298 | | - if(BRANCH == "master"){ |
299 | | - return DOTNET_SDK_VERSIONS.last() |
300 | | - }else{ |
301 | | - return DOTNET_SDK_VERSIONS[0] |
302 | | - } |
303 | | -} |
304 | | - |
305 | | -void waitUntilRebalanceComplete(String ip) { |
306 | | - def cmd = "curl -u Administrator:password http://${ip}:8091/pools/default/rebalanceProgress" |
307 | | - progress = true |
308 | | - iterations = 0 |
309 | | - while(progress && iterations < 20) { |
310 | | - def ret = sh(returnStdout: true, script: cmd).trim() |
311 | | - echo("got '${ret}'") |
312 | | - iterations += 1 |
313 | | - progress = !ret.contains("""{"status":"none"}""") |
314 | | - if(progress) { |
315 | | - echo("got '${ret}', sleeping for 20 sec") |
316 | | - sleep(20) |
317 | | - } |
318 | | - } |
319 | | - |
320 | | -} |
321 | | - |
322 | | -void curl_with_retry(String url, String method, String data) { |
323 | | - def command = """curl -u Administrator:password -X ${method} -s -o /dev/null -w "%{http_code}" -d '${data}' ${url} """ |
324 | | - echo(command) |
325 | | - def return_code = 500 |
326 | | - retval = 1 |
327 | | - iterations = 0 |
328 | | - while(retval > 0 && iterations < 10) { |
329 | | - def ret = sh(returnStdout: true, script: command).trim() |
330 | | - iterations += 1 |
331 | | - echo "returned ${ret}" |
332 | | - return_code = ret as int |
333 | | - // 2XX is success, but sometimes the bucket is already there |
334 | | - // (in the case of installing the sample buckets), so lets ignore |
335 | | - // that and just make this "not 500" |
336 | | - if (return_code > 199 && return_code < 500) { |
337 | | - echo("success = ${return_code}") |
338 | | - retval = 0 |
339 | | - } else { |
340 | | - echo("got #{return_code}, sleeping for 20 sec to try again...") |
341 | | - sleep(20) |
342 | | - } |
343 | | - } |
344 | | - return retval |
345 | | -} |
0 commit comments